-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
pipeline-build-step 2.12
workflow-cps 2.80
blueocean 1.22.0
I have two Jenkins jobs, a parent job that triggers a child job with different configurations and runs these stages in parallel. When a child job has an UNSTABLE state, the parent job reports this stage as failed as long as the parent job is still running. When the parent job is finished all results are propagated as expected.
Example to reproduce:
// Parent job // With three stages with SUCCESS, UNSTABLE and FAILED stages node('<label>'){ def stage_map = [:] stage_map['success'] = trigger('SUCCESS') stage_map['unstable'] = trigger('UNSTABLE') stage_map['failed'] = trigger('FAILED') stage_map['sleep'] = trigger('SUCCESS', true) parallel(stage_map) } def trigger(status, sleep = false){ return { build job: 'test_child', parameters: [ string(name: 'status', value: status), booleanParam(name: 'sleep', value: sleep) ] } }
// Child Job // Sleep parameter to better observe behavior node('<label>'){ properties( [ parameters( [ string(name: 'status', defaultValue: 'SUCCESS'), booleanParam(name: 'sleep', defaultValue: true)] ) ] ) def t = params.sleep ? 30 : 1 sleep(time: t, unit: 'SECONDS') currentBuild.result = params.status }
Possibly related to JENKINS-49073