how to configure job in jekins if first project is

2019-07-26 22:54发布

I want to trigger project in jekins if first project is build successful then trigger another project and so on.. how can do it. I hava project1 , project2, and project3, project4, project5 so on. here I am configuring "Multi-configuration project" job.

for exp:- project1->success then trigger project2->success then trigger project3

if any stage failed then doesn't trigger other project.This is "Multi-configuration project" job, because this single job, I am trigger on multiple slaves remotely.

2条回答
神经病院院长
2楼-- · 2019-07-26 23:39

A simple way to do this would be to define this build pipeline using the Pipeline plugin.

This pipeline script should give you the desired behaviour:

build job: 'project1'
build job: 'project2'
build job: 'project3'
build job: 'project4'
build job: 'project5'

i.e. A build of each job will be started in sequence; if any one of them fails, then the subsequent jobs will not be started.

查看更多
相关推荐>>
3楼-- · 2019-07-26 23:40

Even with "Multi-configuration project" you should be able to set a post-build action "Trigger parameterized build on other projects". Then you can specify condition which will define when this project should be build, and add parameters, including "build on the same node".

查看更多
登录 后发表回答