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 = nodes[i]
def stageName = 'Check git cache ' +
label.replaceAll('(-jagent)|(-ssh)|(-mwaite)|(.markwaite.net)|(-beemarkwaite)|(-jenkins)',
'')
tasks[label] = {
node(label) {
stage(stageName) {
if (isUnix()) {
sh '[ -d /var/lib/git/mwaite ] || (echo
/var/lib/git/mwaite directory not found; exit 1)'
} else {
bat 'echo git cache check not implemented for Windows'
}
}
}
}
}
timeout(time: 3, unit: 'MINUTES') {
parallel(tasks)
}
Jenkins multi-configuration jobs can also build on all agents that match a
particular label, using either the elastic axis plugin or the node label
parameters plugin.
Mark Waite
On Tue, Apr 6, 2021 at 2:36 PM [email protected] <[email protected]>
wrote:
>
> Hi all, I have one master Jenkins CI server and four slaves is is possible
> to build a project on all agents simultaneously ?
>
> --
> 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/e974d160-b2b1-41ca-b23a-5f5ef296831en%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-users/e974d160-b2b1-41ca-b23a-5f5ef296831en%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
--
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/CAO49JtFJsKhyfHmCFfb6Nt8ytJP-fXvfs6_rozRLUOHTimqfRQ%40mail.gmail.com.