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

"restrict where this project can be run" setting missing from job configuration

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Component/s: core
    • Environment:
      Jenkins version: 2.222.1
      OS: Windows Server 2016
      Browser: Google Chrome Version 80.0.3987.149
      Plugins: a large list, not sure which are relevant
    • Similar Issues:

      Description

      I have a master node, and I just added a slave node running as a service. A single machine runs jenkins, the master node, and the slave node. Both master and slave nodes have labels, and they are both connected and running. However, in attempting to set up a project to build on this slave node as per https://scmquest.com/jenkins-master-slave-setup-and-configuration-with-screenshots/ the "Restrict where this project can be run" option is missing from the "general" section. On a single branch project, I see the options "Discard old builds," "Do not allow concurrent builds ," and "Do not allow the pipeline to resume if the master restarts." But not the actual option i need: "Restrict where this project can be run." In a multibranch project, I don't see any additional options at all.

      I'm at a loss of how to proceed from here. I can try using another plugin to restrict which nodes build which project as a workaround to this broken feature, but it would be nice if the feature just worked. Is there further troubleshooting I can perform at my end?

        Attachments

          Activity

          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          Stephen Smith I assume you are trying to set this option for Pipeline jobs.  "Restrict where this project can be run" exists only for Freestyle and other classic project types, for Pipeline you should use node(label) steps within your Pipeline definition. For Declarative Pipeline there is a similar "agent()" definition

          https://jenkins.io/doc/book/pipeline/#scripted-pipeline-fundamentals

          Show
          oleg_nenashev Oleg Nenashev added a comment - Stephen Smith I assume you are trying to set this option for Pipeline jobs.  "Restrict where this project can be run" exists only for Freestyle and other classic project types, for Pipeline you should use node(label) steps within your Pipeline definition. For Declarative Pipeline there is a similar "agent()" definition https://jenkins.io/doc/book/pipeline/#scripted-pipeline-fundamentals
          Hide
          stevesmithbsci Stephen Smith added a comment -

          Thank you, this is the route I ended up taking, and it works like a charm. This ended up being a problem of not being able to resolve old documentation from new functionality.

          I'll close the issue.

          Show
          stevesmithbsci Stephen Smith added a comment - Thank you, this is the route I ended up taking, and it works like a charm. This ended up being a problem of not being able to resolve old documentation from new functionality. I'll close the issue.

            People

            • Assignee:
              Unassigned
              Reporter:
              stevesmithbsci Stephen Smith
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: