From 72d8fba305cae70d96c3235d4ea31af0f9ae5a22 Mon Sep 17 00:00:00 2001 From: log101 Date: Sun, 23 Feb 2025 19:28:14 +0300 Subject: [PATCH] ci: add jenkins file --- Jenkinsfile | 44 ++++++++++++++++++++++++++++++++++++++++++++ astro.config.mjs | 2 +- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..84df06c --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,44 @@ +pipeline { + agent any + + environment { + // Update these values with your image details + DOCKER_IMAGE = "log101-dot-dev" + DOCKER_TAG = "latest" + REGISTRY = "192.168.88.252:5000" + } + + stages { + stage('Checkout') { + steps { + git branch: 'main', url: 'https://git.acayip.dev/log101/log101-dot-dev.git' + } + } + + stage('Build Docker Image') { + steps { + script { + docker.build("${REGISTRY}/${DOCKER_IMAGE}:${DOCKER_TAG}") + } + } + } + + stage('Push to microk8s Registry') { + steps { + script { + docker.withRegistry("http://${REGISTRY}") { + docker.image("${REGISTRY}/${DOCKER_IMAGE}:${DOCKER_TAG}").push() + } + } + } + } + + stage('Cleanup') { + steps { + script { + sh "docker rmi ${REGISTRY}/${DOCKER_IMAGE}:${DOCKER_TAG} || true" + } + } + } + } +} diff --git a/astro.config.mjs b/astro.config.mjs index 50e08f2..2541b8f 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -5,7 +5,7 @@ import remarkToc from "remark-toc"; // https://astro.build/config export default defineConfig({ - site: "https://blog.log101.dev", + site: "https://blog.acayip.dev", markdown: { remarkPlugins: [[remarkToc, { heading: "İçindekiler" }]], shikiConfig: {