-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Major
-
Component/s: pipeline-model-definition-plugin
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.
Â
This is blocking me from upgrading Pipeline plugins for Jenkins
- depends on
-
JENKINS-42753 Generate runtime model directly from AST model
-
- Closed
-