Files
worldcup2026/Jenkinsfile
T
Dongho Kim f83fe07553
dongho-repo/worldcup2026/pipeline/head There was a failure building this commit
update
2026-06-07 00:34:52 +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 {
// Diagnostics to check if group_add is active
sh 'whoami && id && ls -lh /var/run/docker.sock || true'
// Pulls the latest changes from the Git repository
checkout scm
}
}
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()
}
}
}