Running stages in parallel with Jenkins workflow / pipeline

前端 未结 5 619
渐次进展
渐次进展 2020-12-04 15:46

Please note: the question is based on the old, now called \"scripted\" pipeline format. When using \"declarative pipelines\", parallel blocks

5条回答
  •  天命终不由人
    2020-12-04 15:55

    I have just tested the following pipeline and it works

    parallel firstBranch: {
        stage ('Starting Test') 
        {
            build job: 'test1', parameters: [string(name: 'Environment', value: "$env.Environment")]
        }
    }, secondBranch: {
        stage ('Starting Test2') 
        {
            build job: 'test2', parameters: [string(name: 'Environment', value: "$env.Environment")]
        }
    }
    

    This Job named 'trigger-test' accepts one parameter named 'Environment'

    Job 'test1' and 'test2' are simple jobs:

    Example for 'test1'

    • One parameter named 'Environment'
    • Pipeline : echo "$env.Environment-TEST1"

    On execution, I am able to see both stages running in the same time

提交回复
热议问题