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

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      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)

            Assignee:
            vjuranek
            Reporter:
            David Engster
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: