Merge pull request #265 from sartography/ci/fix-parallel-builds

ci: add deploy tag to commit to avoid race conditions
This commit is contained in:
Kevin Burnett 2023-05-18 10:34:19 +00:00 committed by GitHub
commit 50a76cf5d7
1 changed files with 2 additions and 1 deletions

3
Jenkinsfile vendored
View File

@ -63,8 +63,9 @@ pipeline {
stage('Build') { stage('Build') {
steps { script { steps { script {
dir("spiffworkflow-${params.COMPONENT}") { dir("spiffworkflow-${params.COMPONENT}") {
/* Tag and Commit is combined to avoid clashes of parallel builds. */
image = docker.build( image = docker.build(
"${params.DOCKER_NAME}:${env.GIT_COMMIT.take(8)}", "${params.DOCKER_NAME}:${params.DOCKER_TAG}-${env.GIT_COMMIT.take(8)}",
"--label=commit='${env.GIT_COMMIT.take(8)}' ." "--label=commit='${env.GIT_COMMIT.take(8)}' ."
) )
} }