Its not clear to me what you are asking. For example, if there are 4 executors on one slave and 4 on the other one, the parallel branches might run on different slaves or they might run on the same slave but different executors. I set the number of executors equal to the number of cpus (or number of reliably runnable threads) on a slave so the way this works at assigning executors allow the branches to truly run in parallel though they might be waiting on each other for I/O or other shared resources on the slave.
If you really need the jobs to run on different slaves there are several things you can do. 1) Set one executor per slave OR 2) Give the slaves different labels and use those labels in your "node('label")" in the closures you build in your loop. On Mon, Nov 14, 2016 at 10:52 PM, Bryan P <bwp.pear...@gmail.com> wrote: > I am trying to execute a parallel test run however we dont use maven, we > execute our test runs using shell script. Can parallel runs work using the > example below? > > I've tried multiple methods of allowing parallelization however most allow > the execution on one slave instead queuing for another slave. > > def splits = splitTests count(5) > def branches = [:] > for (int i = 0; i < splits.size(); i++) { > def index = i // fresh variable per iteration; i will be mutated > branches["split${i}"] = { > node("node-name") { > deleteDir() > unstash '{env.BRANCH_NAME}' > def exclusions = splits.get(index); > sh './script/test-queue > test/{models,othertests}/**/*.rb"' // unit tests to execute > junit '**/*.xml' > } > } > } > parallel branches > > > > Thanks. > > -- > 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-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/jenkinsci-users/e57b2ab6-84c1-4427-a56e-b3e6983a4e0f%40googlegroups. > com > <https://groups.google.com/d/msgid/jenkinsci-users/e57b2ab6-84c1-4427-a56e-b3e6983a4e0f%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- -- Lee Meador Sent from gmail. My real email address is lee AT leemeador.com -- 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-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAA4vtDTWjqeneyRC8a%3DtPMed9gtv2QWG2TKEtQcmTWt-skqesQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.