Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-57964

Documentation unclear for node() in scripted pipeline

    Details

    • Similar Issues:

      Description

      On this page in the documentation, it describes node().

      https://jenkins.io/doc/pipeline/steps/workflow-durable-task-step/#node-allocate-node

       

      Some examples of using the operators have no quotes. Some have quotes around the individual components (eg. 'linux' || 'osx'). None have the full correct syntax (eg. 'linux || osx').

       

      If you use the form with the quotes around the individual components, you get an error saying that node() does not allow a boolean argument. Of course, we are used to the error messaages occasionally having no useful information.

       

      I suggest changing the documentation to NOT include the example with quotes around the components. (It says exactly this: For example, "osx (10.11)" || "Windows Server")

       

      I also suggest putting something up at the top that shows a full example with an expression as well as a single agent's label.

        Attachments

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              Unassigned
              Reporter:
              leemeador leemeador
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: