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

Pipeline job type has no ability to specify the node labels it can run on

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • pipeline
    • Jenkins 1.656, Ubuntu

      A pipeline job type is missing the ability to specify a node label to restrict where it will build.
      I have different platforms and version of tools on various slave nodes, and it is critical that the job be restricted to a set of nodes where the correct tools and platform are present in order to build successfully. I use node labels to do this with every other job type. Without this functionality, I can see no means of using pipelines on any more-than-trivial job type.

          [JENKINS-39920] Pipeline job type has no ability to specify the node labels it can run on

          James Femia added a comment -

          In a pipeline job you specify which node to run on by putting a `node('label') {}` block in the pipeline script. You don't specify it on the job itself because the the stuff outside node blocks happens on a flyweight executor on the master, while the rest of the job has the ability to run on multiple nodes, dynamically, based on what you write in the script and which bits are in node blocks.

          James Femia added a comment - In a pipeline job you specify which node to run on by putting a `node('label') {}` block in the pipeline script. You don't specify it on the job itself because the the stuff outside node blocks happens on a flyweight executor on the master, while the rest of the job has the ability to run on multiple nodes, dynamically, based on what you write in the script and which bits are in node blocks.

          John Mellor added a comment -

          I added the label as noted, and it works. Thanks!

          John Mellor added a comment - I added the label as noted, and it works. Thanks!

            Unassigned Unassigned
            alt_jmellor John Mellor
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: