So this was working fine before Pipeline Model Definition version 1.1.
==============================
*#!/usr/bin/env groovy*
*def SKIP_BUILD = false*
*pipeline {*
* stages {*
* stage('build') {*
* when {*
* expression {*
* return !SKIP_BUILD*
* }*
* }*
* steps {*
* echo "Do build work here."*
* }*
* }*
* }*
*}*
*================================*
In version 1.0.1 the variable "SKIP_BUILD" was bound correctly and the
expression could properly evaluate it.
As of version 1.1 (and still in 1.1.4) this results in
groovy.lang.MissingPropertyException: No such property: SKIP_BUILD for class:
groovy.lang.Binding
at groovy.lang.Binding.getVariable(Binding.java:63)
Same issue if I was trying to use a function in an expression, it used to work
now it does not bind. Both bind fine outside of the expression block.
Any ideas on this? Is there a bug filed for this issue?
Thanks,
Erik
--
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/aab3163d-8d58-4b07-883c-2a9abe3c767c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.