Thanks, but this approach is not working.
1)  junit 'res.xml'  will always report unstable ( I just can't get it to
report something else)
2) catch will not catch unstable build
3) I tried:
.....
parallel(
    "test1": {
node('master'){
bat 'exit 0'
bat 'type ei_result.xml > res.xml'
try {
                       junit 'res.xml'
                       if (currentBuild.result == 'UNSTABLE'){
currentBuild.result = 'SUCCESS'
                        }
} catch(err) {
                        throw(err)
}
}
},
"test2": {
  node('robot'){
echo "dfds"
}  .......

It's always ending up Yellow, as unstable


On Tue, Mar 28, 2017 at 7:59 PM, <[email protected]> wrote:

> This seem like a declarative way bug too me. I do this into full scripts
> (changing the current build result) and it work fine.
> I haven't tested the declarative (post {}, always {}, ...), but you could
> try a Jenkinsfile without the declarative syntax:
>
> node()
> {
> try
> {
>   // make you junit test that make unstable here
> }catch()
> {
>     if (currentBuild.result == 'UNSTABLE')
>     currentBuild.result = 'SUCCESS'
> }
> }
>
> This should work, if so, it mean that the declarative syntax have a bug in
> it and the currentBuild.result is somehow a copy used into the post scope
> and restore after the processing of the declarative post {}. You should
> open a bug report if so.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Jenkins Users" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/jenkinsci-users/r35UO_Ji4c8/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jenkinsci-users/c18bc05d-ba2e-44e5-8a0f-ffd2dd42e306%40googlegroups.
> com
> <https://groups.google.com/d/msgid/jenkinsci-users/c18bc05d-ba2e-44e5-8a0f-ffd2dd42e306%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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAKokUHBRdQ1LFPgc7WzPPojzz4hpFnMzjPX_%2BqW3Q%3DEu8jAbTw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to