Skip to content

Commit

Permalink
MTL-2088 Fix build race condition (#57)
Browse files Browse the repository at this point in the history
Variables need a `def` in order to be unique/re-defined
within each `matrix` build, otherwise there is a risk of
a race condition happening. The race condition occurs
when one `matrix` build redefines (reuses) the variables
while the variables are being read by another `matrix` build.

In MTL-2088, an SP4 build was publishing RPMs when the SP3
`matrix` build updated these variables, leading to some of
the SP4 RPMs to end up in the SP3 drop-off.
  • Loading branch information
rustydb authored Feb 17, 2023
1 parent 3a9d5da commit d8321b3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Jenkinsfile.github
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ pipeline {
stage('Publish: RPMs') {
steps {
script {
sles_version_parts = "${sleVersion}".tokenize('.')
sles_major = "${sles_version_parts[0]}"
sles_minor = "${sles_version_parts[1]}"
def sles_version_parts = "${sleVersion}".tokenize('.')
def sles_major = "${sles_version_parts[0]}"
def sles_minor = "${sles_version_parts[1]}"
publishCsmRpms(
arch: "noarch",
component: env.NAME,
Expand Down

0 comments on commit d8321b3

Please sign in to comment.