Good to know that there is some kind of issue to make that more handy. My first thought was to catch the exception that occurs on exit code non zero.
Von: John Engelman <[email protected]> An: Jenkins Users <[email protected]>, Datum: 20.05.2016 00:29 Betreff: Re: pipeline: Retrieve exit Code from 'sh' step and perform logic Gesendet von: [email protected] I finally found this (https://issues.jenkins-ci.org/browse/JENKINS-26133) which addresses my issue. On Thursday, May 19, 2016 at 1:55:24 PM UTC-5, John Engelman wrote: Is there a way to perform conditional logic in my pipeline based on the exit code from a 'sh' step? Basically, I want to execute different behavior based on that. In this case it is Terraform which will output different exit codes based on the results of a 'terraform plan' -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/21a894c4-597d-4937-92e1-d7d71c66186d%40googlegroups.com . For more options, visit https://groups.google.com/d/optout. -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/OF59CEAF8B.56B5220B-ONC1257FB9.00272EEE-C1257FB9.00275703%40gauselmann.com. For more options, visit https://groups.google.com/d/optout.
