Details
-
Type:
Bug
-
Status: Open (View Workflow)
-
Priority:
Minor
-
Resolution: Unresolved
-
Component/s: blueocean-pipeline-editor-plugin
-
Labels:
-
Environment:Jenkins 2.73.3
Blue Ocean 1.3.3
Pipeline: Model API 1.2.4
-
Similar Issues:
-
Epic Link:
-
Sprint:Blue Ocean - Candidates
Description
Quoting from https://jenkins.io/doc/book/pipeline/syntax/
agent { node { label 'labelName' } } behaves the same as agent { label 'labelName' }, but node allows for additional options (such as customWorkspace).
If I use the longer syntax, then the Blue Ocean Pipeline Editor shows the label in "Pipeline Settings". However, if I use the shorter syntax, then the "Agent" drop-down list just shows "Select an option". The UI should be the same in either case.
Test with Jenkinsfile:
pipeline { agent { label 'labelName' } stages { stage('Build') { steps { sleep 1 } } } }
vs.
pipeline { agent { node { label 'labelName' } } stages { stage('Build') { steps { sleep 1 } } } }
IMHO, it would be OK to silently convert one syntax to the other.
Testing notes:
For the immediate near term, a one-time manual confirmation that this is working would probably suffice.
James Dumay, would it be worthwhile to start compiling a list of things like this for inclusion into an eventual automated test? Something like a reference Jenkinsfile (or multiples), where we could make sure that the editor successfully reads/writes a Jenkinsfile which has a "greatest hits" of issues?
Rough example: