Skip to content

Commit 347a880

Browse files
author
Owen Mehegan
committed
Add an example of how to parallel builds on multiple nodes
1 parent 291ebcd commit 347a880

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
def labels = ['precise', 'trusty'] // labels for Jenkins node types we will build on
2+
def builders = [:]
3+
for (x in labels) {
4+
def label = x
5+
builders[label] = {
6+
node(label) {
7+
// build steps that should happen on all nodes go here
8+
}
9+
}
10+
}
11+
12+
parallel builders
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Synopsis
2+
3+
This is a simple example showing how to succinctly parallel the same build across multiple Jenkins nodes. This is useful for e.g. building the same project on multiple OS platforms.

0 commit comments

Comments
 (0)