The conventional way of setting an environment variable in declarative pipeline seems to encounter a problem if the environment variable is named “Configuration”. This code:
> environment {
> Configuration="Release"
> }
…yields this error:
> org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
> WorkflowScript: 22: you tried to assign a value to the class 'jenkins.model.Configuration'
> @ line 22, column 25.
> Configuration="Release"
> ^
Is there some way to escape this name to avoid this collision?
The reason I care about this variable name is that I’m attempting to adapt a project that has been using a multi-configuration (matrix) job; and that job makes “Configuration” available as an environment variable (where it has been used in build scripts).
I am using Jenkins 2.176.1.
--
Braden McDaniel
<
bra...@endoframe.com>