It seems like using try/catch complicates the code and then I have to
remember to still fail the pipeline in the exception block. Using the post
functionality seems to be for the entire pipeline not for a specific step.
Is there a post-step functionality that can be invoked for both pass and
fail of a step ? Thanks
On Wednesday, September 20, 2017 at 1:50:21 PM UTC-7, Kai wrote:
>
> Hi,
>
> I have a pipeline with multiple stages and for my integration test stage,
> I trigger my integration test. I wanted to setup some post-step based
> logic where if the test job passes, it does some action and if the test job
> fails it performs a different action (e.g. send email) .
>
> stage('Run Integration Tests') {
> steps {
> timeout(time: 30, unit: 'MINUTES') {
> retry(1) {
> build job: 'my-integration-test'
> }
> }
> }
> }
> Enter code here...
>
> Is it possible to accomplish this kind of setup ?
>
> 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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/3fd2026d-1fbc-428b-9d18-6432063207fd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.