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

Unable to set number of executors on slave through Groovy system script

    Details

    • Similar Issues:

      Description

      I would like to set the number of executors on a slave node in a build step. I tried doing that with a Groovy system script, but it seems to me this is not possible, since the setNumExecutors(int) method is only implemented by jenkins.model.Jenkins, which will however only affect the master node. The method is not accessible through the 'Node', 'Slave' or 'Computer' classes, which would allow me to do that on a slave. For example, like this

      Hudson.instance.getComputer("SlaveName").setNumExecutors(1)

        Attachments

          Activity

          dengste David Engster created issue -
          dengste David Engster made changes -
          Field Original Value New Value
          Component/s slave-status [ 15981 ]
          vjuranek vjuranek made changes -
          Issue Type Bug [ 1 ] New Feature [ 2 ]
          Component/s core [ 15593 ]
          Component/s groovy [ 15549 ]
          jglick Jesse Glick made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Won't Fix [ 2 ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 156314 ] JNJira + In-Review [ 195370 ]

            People

            • Assignee:
              vjuranek vjuranek
              Reporter:
              dengste David Engster
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: