Skip to content

Commit

Permalink
fix: only build docker images on deployable branches
Browse files Browse the repository at this point in the history
  • Loading branch information
Dominick Leppich committed Oct 29, 2024
1 parent f8f5d87 commit 6afcd77
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -227,11 +227,22 @@ pipeline {
}
stage('build and publish production image to GitHub container registry') {
agent any
when {
anyOf {
branch 'master'
branch 'hotfix_release_*'
branch 'develop'
}
}
steps {
unstash 'target'
script {
docker.withRegistry('https://ghcr.io','jenkins-github-container-registry') {
dockerimage_public = docker.build("intranda/goobi-workflow:${env.BUILD_ID}_${env.GIT_COMMIT}", "--build-arg build=false .")
//TODO: Activate this once we want the latest build to point to the latest release
//if (env.GIT_BRANCH == 'origin/master' || env.GIT_BRANCH == 'master') {
// dockerimage_public.push("latest")
//}
if (env.GIT_BRANCH == 'origin/develop' || env.GIT_BRANCH == 'develop') {
dockerimage_public.push("develop")
}
Expand Down

0 comments on commit 6afcd77

Please sign in to comment.