From 4c0257477aae712b01ef31c447b09a2741474b22 Mon Sep 17 00:00:00 2001 From: Jonathan Lebon Date: Thu, 9 Feb 2023 16:23:14 -0500 Subject: [PATCH] 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. --- jobs/build.Jenkinsfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jobs/build.Jenkinsfile b/jobs/build.Jenkinsfile index f4aa88013..5b3da0cf0 100644 --- a/jobs/build.Jenkinsfile +++ b/jobs/build.Jenkinsfile @@ -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', @@ -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),