Skip to content

Commit

Permalink
jobs/build: add WAIT_FOR_RELEASE_JOB parameter
Browse files Browse the repository at this point in the history
In RHCOS, the pipeline is mainly driven by higher-level tools that
orchestrate a larger pipeline. In that context, it's not helpful to have
the `build` job just trigger the `build-arch` jobs and `release` jobs
and exit. Automation would have to independently track the state of the
triggered jobs and wait for them. It's much simpler to be able to wait
for just the `build` job.

This patch adds a new `WAIT_FOR_RELEASE_JOB` parameter which makes the
`build` job wait for the `release` job to finish, propagating failures
accordingly.
  • Loading branch information
jlebon committed Feb 22, 2023
1 parent 3dd7b9f commit 4c02574
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion jobs/build.Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ properties([
booleanParam(name: 'NO_UPLOAD',
defaultValue: false,
description: 'Do not upload results to S3; for debugging purposes.'),
booleanParam(name: 'WAIT_FOR_RELEASE_JOB',
defaultValue: false,
description: 'Wait for the release job and propagate errors.'),
] + pipeutils.add_hotfix_parameters_if_supported()),
buildDiscarder(logRotator(
numToKeepStr: '100',
Expand Down Expand Up @@ -491,7 +494,7 @@ def run_release_job(buildID) {
// Since we are only running this stage for non-production (i.e.
// mechanical and development) builds we'll default to allowing failures
// for additional architectures.
build job: 'release', wait: wait, parameters: [
build job: 'release', wait: params.WAIT_FOR_RELEASE_JOB, parameters: [
string(name: 'STREAM', value: params.STREAM),
string(name: 'ADDITIONAL_ARCHES', value: params.ADDITIONAL_ARCHES),
string(name: 'VERSION', value: buildID),
Expand Down

0 comments on commit 4c02574

Please sign in to comment.