Re: Build on all agents

2021-04-14 Thread Mark Waite
See the parallel step On Wed, Apr 14, 2021 at 1:00 AM pe...@pjksolutions.com < p...@pjksolutions.com> wrote: > HI Mark your code now runs as expected, now that I have a collection of > nodes how can I use them to build a specific job ? > > On Monday, 12 April 2021 at 17:54:54 UTC+1 Mark Waite wro

Re: Build on all agents

2021-04-14 Thread pe...@pjksolutions.com
HI Mark your code now runs as expected, now that I have a collection of nodes how can I use them to build a specific job ? On Monday, 12 April 2021 at 17:54:54 UTC+1 Mark Waite wrote: > The Jenkins Pipeline DSL is extensible. It is extended by Jenkins plugins > that you may choose to install.

Re: Build on all agents

2021-04-12 Thread Mark Waite
The Jenkins Pipeline DSL is extensible. It is extended by Jenkins plugins that you may choose to install. The nodesByLabel step is provided by the Pipeline uti

Re: Build on all agents

2021-04-12 Thread pe...@pjksolutions.com
The complete error dump java.lang.NoSuchMethodError: No such DSL method 'nodesByLabel' found among steps [archive, bat, build, catchError, checkout, deleteDir, dir, echo, emailext, emailextrecipients, envVarsForTool, error, fileExists, findBuildScans, getContext, git, input, isUnix, junit, libr

Re: Build on all agents

2021-04-12 Thread pe...@pjksolutions.com
Hi Mark I tried to run it and got java.lang.NoSuchMethodError: No such DSL method 'nodesByLabel' and a lot more errors On Saturday, 10 April 2021 at 21:58:43 UTC+1 Mark Waite wrote: > The sample that I provided would be placed in a file named 'Jenkinsfile' > at the root of a git repository,

Re: Build on all agents

2021-04-10 Thread Mark Waite
The sample that I provided would be placed in a file named 'Jenkinsfile' at the root of a git repository, then a Pipeline job should be defined in Jenkins for that git repository. On Sat, Apr 10, 2021 at 2:33 PM pe...@pjksolutions.com < p...@pjksolutions.com> wrote: > Thanks Mark, where do I run

Re: Build on all agents

2021-04-10 Thread pe...@pjksolutions.com
Thanks Mark, where do I run that code ? On Tuesday, 6 April 2021 at 21:47:19 UTC+1 Mark Waite wrote: > Yes. The Jenkins Pipeline can request to build on all available agents or > on all agents that match a specific label. See nodesByLabel. > > Here's an example: > > def nodes = nodesByLabel la

Re: Build on all agents

2021-04-06 Thread Mark Waite
Yes. The Jenkins Pipeline can request to build on all available agents or on all agents that match a specific label. See nodesByLabel. Here's an example: def nodes = nodesByLabel label: '!windows' nodes = nodes.sort() Map tasks = [:] for (int i = 0; i < nodes.size(); i++) { def label = no