Yup - currentBuild.result isn't actually set until either something is
explicitly setting the status (like a failure or unstable) or the build
ends, at which point it's set to success if still null. So basically null
is equivalent to success.

A.

On Sat, Feb 11, 2017 at 9:49 AM Dan Tran <dant...@gmail.com> wrote:

>
> Hi
>
> It seems currentBuild.result is not set at post stages, here is the
> snippet. is it normal?  it always return null for my case
>
>    stages {
>       ...
>     }
>
>     post {
>
>         always {
> script {
>            wrap([$class: 'BuildUser']) {
>                       mail to: "${env.BUILD_USER_EMAIL}",
>                           subject: "${env.BUILD_URL}
> ${currentBuild.result}",
>                               body: "${env.BUILD_URL} completed"
>                            }
>                        }
>         }
>
>     }
>
> Thanks
>
> -Dan
>
> --
> 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/ce8101b2-6a0b-4581-a39b-5b831339d62f%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-users/ce8101b2-6a0b-4581-a39b-5b831339d62f%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> 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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAPbPdOaY5mpuqznq7nLTPnkm6t_7JEtfoa4iNaNVGkH%3Dp1eKiw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to