Reputation: 25969
I've figured out how to trigger another Jenkins project build after a successful build, but how do you solve next situation:
Project A triggers project B and C. Project D should only be build if project B and C have successfully been built. I can't configure B to trigger project D because I'm not sure project C has been built yet, and vice versa.
Upvotes: 11
Views: 21857
Reputation: 2327
Just use view name with job name example:-
if your one job in stg and other in a so post-build would be:-
success { build job: "QA/job" }
Upvotes: 0
Reputation: 1699
Alternatively you can orchestrate this with a Pipeline job. For example you could have another job doing this (or you could make job A into a pipeline job and skip the first build
step)
build 'A'
parallel(firstTask: {
build 'B'
}, secondTask: {
build 'C'
})
build 'D'
Upvotes: 2
Reputation: 982
The "build after other projects are built" suggested by Akhil will not accomplish the stated goal. It will trigger Project D after either Project B or Project C is built. Use the Join Plugin.
Upvotes: 13
Reputation: 479
There is an option in "Build Triggers" option to "Build after other projects are built". Here is the snapshot for the same:
In the Projects to watch, mention: Project B, Project C
(Note that multiple projects are mentioned with a comma separated value)
Upvotes: 3