Hi,
   Since I upgrade my pipeline definition plugin to 1.1.1 my JenkinsFile 
are not valid anymore. The refactoring done on the parseEnvironment method 
seems to be the root cause.

  What I'm doing is declaring a set of constants at the begining of my 
Jenkins files and using them at several places in the pipeline. It works 
everywhere but in the environment block.
  In the environment block if I use the constant name directly it throws an 
error because I must use a (inlined) constant or a function call. If I put 
my variable between double quote it says it can't bind it.

  Here is a sample pipepline :

def BAR = "bar";
pipeline {
    environment {
        FOO = "${BAR}" // Binding Error

        FOO = BAR          // Environment variable values must either be 
strings or function calls
    }

agent {
label "some-label"
}

stages {
stage("foo") {
steps {
sh 'echo "FOO is $FOO"'
}
}
}
}


   Is it a normal it doesn't work anymore or a bug ?

Regards.

-- 
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/5f1ab506-9a60-4346-a7ba-38ee812b00e5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to