[JIRA] (JENKINS-61737) Parallel Build job propagates FAIL while running when child job UNSTABLE

2 views
Skip to first unread message

philippjung2010@live.de (JIRA)

unread,
Mar 30, 2020, 4:27:03 AM3/30/20
to jenkinsc...@googlegroups.com
Philipp Jung created an issue
 
Jenkins / Bug JENKINS-61737
Parallel Build job propagates FAIL while running when child job UNSTABLE
Issue Type: Bug Bug
Assignee: Unassigned
Attachments: after_run.png, during_run.png
Components: blueocean-plugin, pipeline-build-step-plugin, workflow-cps-plugin
Created: 2020-03-30 08:26
Environment: pipeline-build-step 2.12
workflow-cps 2.80
blueocean 1.22.0
Priority: Minor Minor
Reporter: Philipp Jung

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

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages