Its strategy is to try to use the same node it last built on. If you have available executors, it will use one. if you have a label assigned to many slaves, each with one executor, it will do what you want.
One way to do what you want is to have each “archive” whatever files you want which puts them onto the Jenkins server and then use “Copy artifacts from another project”
--
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/3d1d0150-3125-4b54-a846-b0a6687022cf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Maybe I misunderstand your problem. Let’s keep it simple.
The reason the multiple runs of your build flow job run on the same node is because, when selecting a node, it tries to run it one the same node it previously ran on (#2 in the Strategy below). If your nodes had just 1 executor defined, then any consecutive runs would run on different nodes. But with 8 executors, it just runs it there.
Scheduling strategy
Some slaves are faster, while others are slow. Some slaves are closer (network wise) to a master, others are far away. So doing a good build distribution is a challenge. Currently, Jenkins employs the following strategy:
If you have interesting ideas (or better yet, implementations), please let me know.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/0a9cb8a5-d3ef-4f02-8506-0e4b0a986493%40googlegroups.com.
Can you provide a simple example of your main buildflow job?
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/e787a0c5-7c45-4100-af52-05269ce704d6%40googlegroups.com.
Ok, so your upper job Sample Flow does
Build(Sample downstream job, node: name-name)
And Sample downstream job does a find grep command
And your image represents starting Sample flow job 9 times. Since there are 9 available executors on dvm-qa5, all 9 Sample flow jobs start. I expect that 8 of them pend waiting on Sample downstream job to finish (unless you checked “Run concurrent”)
And I think you wanted those 9 jobs to be distributed among other nodes in your group like dvm-qa2 and 1?
I think that I don’t know how to get it to do what you want but I would not call it a “problem”. This strategy “Jenkins tries to build a project on the same computer that it was previously built.” Is called “affinity” and it helps a great deal when jobs are pulling source code and/or building. It can greatly speed up the process.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/aea6321b-8ab0-4311-b405-3dda4f533458%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/aea6321b-8ab0-4311-b405-3dda4f533458%40googlegroups.com.
job = build('downstream job')
toolbox.copyFiles(job.workspace, build.workspace)
//Unrelated but also useful:
out.println job.build.log