Code changed in jenkins
User: Andrew Bayer
Path:
pipeline-model-api/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTAgent.java
pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/parser/ModelParserTest.java
pipeline-model-definition/src/test/resources/agentLabelEmptyString.groovy
http://jenkins-ci.org/commit/pipeline-model-definition-plugin/c18ba8695ff32a4cb81e711aaed5ee8a5718021e
Log:
JENKINS-43016 Convert empty string label agent to agent any in JSON
This'll make the editor happier - the label agent type does require an
argument, but an empty string is a valid (but weird) use case. The
editor, however, has no way of distinguishing between "you didn't
specify a label" and "you specified an empty string for the
label". There still should be work in the editor to figure out how to
actually handle this situation, but this fix at least will unbreak
existing Jenkinsfiles with empty string label agents being opened in
the editor, by converting the JSON in that case to be `agent any`,
which is functionally equivalent if no additional options are specified.
However, if additional options are specified (such as
`customWorkspace`), we have to punt and keep using the empty string
label agent.
abayer I am receiving the Label param from node as being required from jenkins/blue/rest/pipeline-metadata/agentMetadata?depth=20
After talking to vivek he said I should ping you about it.
This is the full JSON response:
https://gist.github.com/NicuPascu/9ed1d96d4604274683ad2ef48a0778fc