Dear Alex, Many thanks for your very helpful response!
Slide (2020/08/06 07:01 -0700): > It's because you are using double quotes, which means Groovy (which > pipeline is built on) will try and interpolate the variable. You would need > to do something like this: [...] I kind of thought I _needed_ double quotes for the expansion to work so it's funny to discover that may very well be the cuase of the problem. So am I understanding correctly that single quotes will (1) protect $foo from being interpolate by Groovy but (2=) let token-macro expansion continue to work? Is that right? On IRC, I have also been advised not to use such variables but tather those provided by Groovy directly and listed at JENKINS_URL/job/JOB_NAME/pipeline-syntax/globals So I tried to use currentResult (without any quotes around it) but that didn't work either. Is it supposed to be a method and I am supposed to use currentResult() ? I also saw a mention of currentBuild.result but that I didn't try yet and would be happy to get a hint on how to use that one and whether I need to import something or so to get all this to work? Many thanks again Alex and all, Sébastien. -- 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/20200807143458.GA87950%40om.localdomain.