Choose more than one agent at a time

43 views
Skip to first unread message

Sam K

unread,
Jan 10, 2017, 1:40:16 PM1/10/17
to Jenkins Users
How can I tell Jenkins pipeline to pick up more than one agent at a time if they are free?  I see there are ways to do this with the normal jobs.  But I'm looking for options in the coded pipeline method.  

I have two slaves with the same label called 'jenkins-slave'.  I have setup all nodes to 'Only build jobs with label expression matching'.  When I launch a pipeline with jenkins-slave as node ('jenkins-slave') only one of them is picked up and does all the work. I want it to use more than one if available.  

Indra Gunawan (ingunawa)

unread,
Jan 10, 2017, 2:22:48 PM1/10/17
to jenkins...@googlegroups.com

Are you saying that the stages in pipeline should run on the other node?

Between stages, I do not see how can you tell Jenkins to use different node in the label.

 

Jenkins has this default tendency to use node last used too for load balancer.

 

For multiple task in parallel, you use “parallel”.  For concurrency of multiple run of pipeline you use “concurrency” set to the “stage”.

https://www.cloudbees.com/blog/parallelism-and-distributed-builds-jenkins

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/f5e549a7-c6ca-4110-acef-f79114d2cf8f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sam K

unread,
Jan 10, 2017, 2:56:12 PM1/10/17
to Jenkins Users, ingu...@cisco.com
Yes.  I am using parallel blocks.  Within the parallel block is a task that has node('jenkins-slave') and I want that to run on a different slave.  Instead, what i've seen is that if there are 10 parallel steps to be executed, it executes all of them on the 10 executors on the same slave.  There is another slave with the same label sitting idle.  is there a way to tell Jenkins to use that slave as well?  

Sam K

unread,
Jan 10, 2017, 3:01:09 PM1/10/17
to Jenkins Users, ingu...@cisco.com
BTW, concurrency is deprecated.  


On Tuesday, January 10, 2017 at 11:22:48 AM UTC-8, Indra Gunawan (ingunawa) wrote:

Indra Gunawan (ingunawa)

unread,
Jan 10, 2017, 3:58:25 PM1/10/17
to jenkins...@googlegroups.com

I am curious if you can play around with https://wiki.jenkins-ci.org/display/JENKINS/Least+Load+Plugin.  Once this plugin is installed, it simply replaces the default behavior of Jenkins wrt assigning task/workload to node.

Reply all
Reply to author
Forward
0 new messages