Trigger a job based on failure of another/upstream job

11 views
Skip to first unread message

Kishor Ramanan

unread,
Jun 27, 2017, 2:40:27 PM6/27/17
to Jenkins Users
Hi,

Is there a way where I can trigger a job based on the failure condition of other job?

I am using pipeline as of now, during the last step if pipeline fails, I want to execute a specific set of job.

Thanks

Максим

unread,
Jun 28, 2017, 4:34:27 AM6/28/17
to Jenkins Users
Hi!
Perhaps you can use try-catch blocks.
And run your job in a catch block

вт, 27 июн. 2017 г. в 21:40, Kishor Ramanan <kishor...@gmail.com>:
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/ce1a300c-be24-4c94-8b71-62042e1d85af%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--

С уважением, Сёмочкин Максим.
Twitter: maksim77
+7 926 9056085

Michael Pailloncy

unread,
Jun 28, 2017, 6:52:45 AM6/28/17
to jenkins...@googlegroups.com
Are you using the Scripted or Declarative way to write your Pipeline ?
If you are in Declarative mode, I think that you can easily do that with the post section => see https://jenkins.io/doc/book/pipeline/syntax#post

2017-06-28 7:06 GMT+02:00 Максим <maksim...@gmail.com>:
Hi!
Perhaps you can use try-catch blocks.
And run your job in a catch block

вт, 27 июн. 2017 г. в 21:40, Kishor Ramanan <kishor...@gmail.com>:
Hi,

Is there a way where I can trigger a job based on the failure condition of other job?

I am using pipeline as of now, during the last step if pipeline fails, I want to execute a specific set of job.

Thanks

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscribe@googlegroups.com.
--

С уважением, Сёмочкин Максим.
Twitter: maksim77
+7 926 9056085

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CANJG3dJjovR7VcpCkNNm7XVm9%3DLCpiPB1Xi_gZgrghkwVz9bJw%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages