Files
blog/Jenkinsfile
T
Dongho Kim afa5f39c53
dongho-repo/blog/pipeline/head There was a failure building this commit
permission fix
2026-06-02 18:20:29 +02:00

40 lines
1.1 KiB
Groovy

pipeline {
agent {
node {
label 'dongho' // Runs the deployment on the 'dongho' agent
}
}
environment {
// Prepend common docker install paths to the environment PATH
PATH = "/usr/local/bin:/usr/bin:/bin:${env.PATH}"
}
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()
}
}
}