Skip to content

Commit 4c02574

Browse files
committed
jobs/build: add WAIT_FOR_RELEASE_JOB parameter
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.
1 parent 3dd7b9f commit 4c02574

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

jobs/build.Jenkinsfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ properties([
4949
booleanParam(name: 'NO_UPLOAD',
5050
defaultValue: false,
5151
description: 'Do not upload results to S3; for debugging purposes.'),
52+
booleanParam(name: 'WAIT_FOR_RELEASE_JOB',
53+
defaultValue: false,
54+
description: 'Wait for the release job and propagate errors.'),
5255
] + pipeutils.add_hotfix_parameters_if_supported()),
5356
buildDiscarder(logRotator(
5457
numToKeepStr: '100',
@@ -491,7 +494,7 @@ def run_release_job(buildID) {
491494
// Since we are only running this stage for non-production (i.e.
492495
// mechanical and development) builds we'll default to allowing failures
493496
// for additional architectures.
494-
build job: 'release', wait: wait, parameters: [
497+
build job: 'release', wait: params.WAIT_FOR_RELEASE_JOB, parameters: [
495498
string(name: 'STREAM', value: params.STREAM),
496499
string(name: 'ADDITIONAL_ARCHES', value: params.ADDITIONAL_ARCHES),
497500
string(name: 'VERSION', value: buildID),

0 commit comments

Comments
 (0)