You could use the error step: error 'Error message' https://jenkins.io/doc/pipeline/steps/workflow-basic-steps/#code-error-code-error-signal
mandag 30. mai 2016 09.21.16 UTC+2 skrev Feng Yu følgende: > > Hi there: > Here is my pipeline code: > node{ > // my code here > try { > // some steps > currentBuild.result = 'SUCCESS' > } catch (Exception err) { > currentBuild.result = 'FAILURE' > mail // email to me if failed > // some clean steps > } > > if (currentBuild.result == 'FAILURE') { > // How to exit pipeline ? > } > > /* > * other steps here > */ > } > > > How do I break the pipeline manually if some steps failed? > > 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/691bdf0b-fb13-4861-afd8-fa15f9c551f4%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.