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

Which node Groovy code actually executes on is not documented clearly

      The documentation in the tooltip informs the user that they are able to use the Groovy GDK but doesn't make it clear to the user on which machine the Groovy code will execute.

      teilo mentioned with the following snippet that it wouldn't work because it would run on the master:

      node {
          if (System.getProperty("os.name") == 'Linux') {
              sh 'echo "hi"'
          }
      }
      

          [JENKINS-31687] Which node Groovy code actually executes on is not documented clearly

          Jesse Glick added a comment -

          True, this help text needs to be revised for several reasons.

          Jesse Glick added a comment - True, this help text needs to be revised for several reasons.

          Jesse Glick added a comment -

          BTW in this case you would now use isUnix.

          Jesse Glick added a comment - BTW in this case you would now use isUnix .

          Sam Van Oort added a comment -

          Sam Van Oort added a comment - Also documented here: https://jenkins.io/doc/book/pipeline/scaling-pipeline/

          Sam Van Oort added a comment -

          Mentioned in docs

          Sam Van Oort added a comment - Mentioned in docs

            paddyoh Patrick O'Hannigan
            rtyler R. Tyler Croy
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: