Reputation: 125
I have three Jenkins jobs. The first job has "execute bash" as a build step. The bash script has if/else statement. And based on this if/else I need to trigger the other two jobs. Is there a way in the "execute shell" to trigger other jobs?
Upvotes: 5
Views: 9888
Reputation: 22089
Inside the Execute Shell
, you can execute any shell command (including curl
).
You can trigger an existing job with curl
. e.g.
curl -X POST http://xx.xx.xx.xx:xx/job/jobname/build --user foo:foo_token
Upvotes: 7