如何将参数从子作业设置为父多作业

时间:2017-07-11 14:23:23

标签: jenkins groovy

我在Jenkins有一个包含多个子多工作的多工作项目。像这样:

ParentMultiJob{
 - childJobOne
 - childJobTwo
 - childJobThree
}

他们都有String参数:'架构'。所以我使用参数 schema ='default'运行Parent Multi作业,子作业将具有相同的参数值 schema ('default')。 !!!但是childJobOne在属性文件中写入参数模式的新值。此值也在控制台中打印。如果第一个作业是绿色的,我需要获得此值并设置为下一个childJobs。 例如: 1。

ParentMultiJob (parameter schema=default){
 - childJobOne (parameter schema=default, create property file where schema=custom, status = green)
 - childJobTwo (parameter schema=custom)
 - childJobThree (parameter schema=custom)
}

2

ParentMultiJob (parameter schema=default){
 - childJobOne (parameter schema=default, create property file where schema=custom, status = false)
 - childJobTwo (parameter schema=default)
 - childJobThree (parameter schema=default)
}

我怎样才能使用groovy脚本或其他东西?

0 个答案:

没有答案
相关问题