-
Bug
-
Resolution: Fixed
-
Major
-
None
Converting JSON to Jenkinsfile where parallel branch names contain non-identifier characters, the Jenkinsfile is invalid, the names are not quoted.
E.g. this JSON:
{"pipeline":{"agent":{"isLiteral":true,"value":"any"},"stages":[{"name":"parallel","branches":[{"name":"parallel 1","steps":[{"name":"echo","arguments":[{"key":"message","value":{"isLiteral":true,"value":"1"}}]}]},{"name":"parallel 2","steps":[{"name":"echo","arguments":[{"key":"message","value":{"isLiteral":true,"value":"2"}}]}]}]}]}}
Generates this invalid Jenkinsfile:
pipeline { agent any stages { stage('parallel') { steps { parallel( parallel 1: { echo(message: '1') }, parallel 2: { echo(message: '2') } ) } } } }
Sorry for the ugly formatting.
- links to