I posted a comment on the JIRA and read through Jenkins source code for a
while, but did not find a way to do it.
I would have preferred a simple job that ran periodically and just adjusted
the number of executors on each slave, but I came up with an alternate
approach.
- Increased the
I'm still not able to use setNumExecutors. I was able to use setNodeLabel
though with the following code in script console:
for (slave in jenkins.model.Jenkins.instance.slaves) {
oldLabelName = slave.getLabelString()
println("Label= $oldLabelName")
if
As far as I see that method is public as you can see in the javadoc:
- http://javadoc.jenkins-ci.org/hudson/model/Slave.html#setNumExecutors(int)
You might need to execute save afterwards:
- http://javadoc.jenkins-ci.org/hudson/model/Node.html#save()
Cheers
--
You received this message
Thanks - I had looked into throttleconcurrent as well. I think the method to
change the number of concurrent per project is private though, so it appears
the only way to modify is manual. If there's a way to do it with a groovy
script that plugin would be perfect.
On Oct 7, 2016, at 6:20
You can set the number of concurrent builds of a project running per node
or globally with the below plugin:
- https://wiki.jenkins-ci.org/display/JENKINS/Throttle+Concurrent+Builds+Plugin
Cheers
On Friday, 7 October 2016 22:31:54 UTC+2, Mark Sinclair wrote:
>
>
> I have several projects, each