update
dongho-repo/blog/pipeline/head There was a failure building this commit

This commit is contained in:
Dongho Kim
2026-06-02 18:07:37 +02:00
parent 6091ff999f
commit eae4b17feb
3 changed files with 50 additions and 8 deletions
Vendored
+34
View File
@@ -0,0 +1,34 @@
pipeline {
agent {
node {
label 'dongho' // Runs the deployment on the 'dongho' agent
}
}
stages {
stage('Checkout') {
steps {
// Pulls the latest changes from the Git repository
checkout scm
// Initialize and update Git submodules (necessary for themes like themes/paper)
sh 'git submodule update --init --recursive'
}
}
stage('Build & Deploy') {
steps {
echo 'Building Docker image and starting service...'
// Build the image and recreate container with minimal downtime
sh 'docker compose up -d --build --remove-orphans'
}
}
}
post {
always {
// Clean up the temporary Jenkins workspace since the files are baked into the image
cleanWs()
}
}
}