-
Bug
-
Resolution: Fixed
-
Minor
-
None
The environment variable name should be valid Java (well, Groovy) identifier, it should be validated such as not generating invalid Jenkinsfiles.
This JSON:
{ "pipeline": { "agent": { "type": "none", "arguments": [] }, "stages": [ { "name": "s", "branches": [ { "name": "default", "steps": [ { "name": "echo", "arguments": [ { "key": "message", "value": { "isLiteral": true, "value": "m" } } ] } ] } ] } ], "environment": [ { "key": "S PACE", "value": { "isLiteral": true, "value": "" } }, { "key": "", "value": { "isLiteral": true, "value": "" } } ] } }
Results in this invalid Jenkinsfile:
pipeline { agent none stages { stage('s') { steps { echo('m') } } } environment { S PACE = '' = '' } }
- links to