If you set the number of executors on both master and slave to 1 that will restrict the number of builds to one per node put a third into the queue.
Regards Daniel On Fri, 24 Aug 2018, 12:58 Nati Mirauta, <[email protected]> wrote: > Hello, > > I would like to know if there is a way to run a job on master once and > after another build request, instead of having the job stay in queue I > would want the job to run on slave and then after it runs both on master > and on slave, after the next build request it will have to sit in queue. > For example I have JOB1, I build it and it runs on 'master', I build it > again and JOB1 will run in parallel on 'slave', if I build it again while > it's already running on 'master' and 'slave', the job will have to sit in > queue. > > I have tried using the Throttle Concurrent Builds Plugin available for > Jenkins but I do not know exactly how to use it in a scripted pipeline. > Only thing I know how to do is make a job run concurrently on 'master 'or > 'slave' (two runs - both or master or both on slave) with a single build > using throttle(). I have to implement this functionality in a pipeline (no > plug-in checkboxes) so it will make working with git easier. Can Jenkins > support this functionality?, if yes, is it possible to implement it in a > scripted pipeline? I am VERY new to Jenkins, I searched the internet but I > can't find anything. I greatly appreciate any kind of help/tip, any > documentation that can help me achieve this functionality. > > Thank-you in advance. > > -- > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-users/265011e8-83fa-4a93-b127-85f3ae17cda6%40googlegroups.com > <https://groups.google.com/d/msgid/jenkinsci-users/265011e8-83fa-4a93-b127-85f3ae17cda6%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAO37hbiQ96XsWMVbxcDxxPsqgaNqL1sfieQg%3DvSvG%2BdCT93s6Q%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
