Re: sending email for unstable builds

2019-03-19 Thread Aaron Digulla
Hi, I'm using this code: node(...) { try { ...add stages here... } catch(Exception e) { currentBuild.result = 'FAILURE' // Let the post step know that the build failed with an error. throw e } finally {

Re: sending email for unstable builds

2019-03-19 Thread Mark Lübbehüsen
HI, you can fail your pipeline if you put the following code in the unit test stage script { currentBuild.result = currentBuild.result ?: 'FAILED' } Am Dienstag, 12. März 2019 23:31:43 UTC+1 schrieb Faad Sayaou: > > thanks for your contribution. Is there any other

Re: sending email for unstable builds

2019-03-19 Thread Mark Lübbehüsen
script { currentBuild.result = currentBuild.result ?: 'FAILED' } Am Dienstag, 12. März 2019 23:31:43 UTC+1 schrieb Faad Sayaou: > > thanks for your contribution. Is there any other way of failing of failing > the pipeline when unit test stage is unstable? I have

Re: sending email for unstable builds

2019-03-12 Thread Faad Sayaou
thanks for your contribution. Is there any other way of failing of failing the pipeline when unit test stage is unstable? I have something like the following in my code to ignore the failed test but I will like to stop the pipeline and publish unit test result. I am currently experiencing a

Re: sending email for unstable builds

2019-03-11 Thread Mark Lübbehüsen
Hi, its better you send emails in the post action post { always { } success { } unstable { } failure { } aborted { } } https://jenkins.io/doc/pipeline/tour/post/ Am Donnerstag, 28. Februar 2019 21:41:50 UTC+1 schrieb

Re: sending email for unstable builds

2019-03-01 Thread Simon Bayer
Vers Nice, appreciate your feedback. Glad that We could help you :) Ursprüngliche Nachricht Von: Faad Sayaou Datum: 01.03.19 08:34 (GMT+01:00) An: jenkinsci-users@googlegroups.com Betreff: Re: sending email for unstable builds thanks @Simon and @Sagar for your responses

Re: sending email for unstable builds

2019-02-28 Thread Faad Sayaou
r/post/ > > > Ursprüngliche Nachricht > Von: Simon Bayer > Datum: 01.03.19 06:32 (GMT+01:00) > An: jenkinsci-users@googlegroups.com > Betreff: Re: sending email for unstable builds > > Dear Faad, dear Sagar, > U could check the global variable 'currentBuild

Re: sending email for unstable builds

2019-02-28 Thread Simon Bayer
Check This if u need post build actions for different build status: https://jenkins.io/doc/pipeline/tour/post/ Ursprüngliche Nachricht Von: Simon Bayer Datum: 01.03.19 06:32 (GMT+01:00) An: jenkinsci-users@googlegroups.com Betreff: Re: sending email for unstable builds Dear

Re: sending email for unstable builds

2019-02-28 Thread Simon Bayer
Utekar Datum: 01.03.19 03:06 (GMT+01:00) An: jenkinsci-users@googlegroups.com Betreff: Re: sending email for unstable builds You can check the status of build by using BUILD_STATUS, if it is unstable then send a mail On Fri, 1 Mar 2019, 02:11 Faad Sayaou, mailto:faad...@gmail.com>> wro

Re: sending email for unstable builds

2019-02-28 Thread Sagar Utekar
You can check the status of build by using BUILD_STATUS, if it is unstable then send a mail On Fri, 1 Mar 2019, 02:11 Faad Sayaou, wrote: > Hi everyone > I am using the extended email plugin for notification when the build fails > by using try catch. I will also like to send email when the

sending email for unstable builds

2019-02-28 Thread Faad Sayaou
Hi everyone I am using the extended email plugin for notification when the build fails by using try catch. I will also like to send email when the build is unstable. Below is the structure of my pipeline node { try { stage('Checkout') { cleanWs()