-
Bug
-
Resolution: Fixed
-
Major
-
None
-
Jenkins 2.32.3
Pipeline Model Definition Plugin 1.1.1 (and associated/dependent plugins)
We'd like to do:
pipeline {
// snip //
environment {
VARIABLES = credentials('MOZILLIANS_VARIABLES')
SAUCELABS_API_KEY = credentials('SAUCELABS_API_KEY')
PYTEST_ADDOPTS = "--color=yes --driver=SauceLabs --variables=capabilities.json --variables=${VARIABLES}"
}
// snip //
}
But we get:
WorkflowScript: 25: ""--variables" is not a valid identifier and cannot be used for an environment variable. Identifiers must start with a letter or underscore and can contain only letters, numbers or underscores. @ line 25, column 7. "--variables=${VARIABLES}"
The workaround is to currently do:
pipeline {
// snip //
environment {
VARIABLES = credentials('MOZILLIANS_VARIABLES')
SAUCELABS_API_KEY = credentials('SAUCELABS_API_KEY')
}
stages {
stage('Test') {
environment {
PYTEST_ADDOPTS = "--color=yes --driver=SauceLabs --variables=capabilities.json --variables=${VARIABLES}"
}
// snip //
}