forked from meta-rust/meta-rust
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
39 lines (35 loc) · 1.15 KB
/
Jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
def targets = [ 'qemux86', 'qemux86-64', 'qemuarm', 'qemuarm64', 'qemumips' ]
def machine_builds = [:]
for (int i = 0; i < targets.size(); i++) {
def machine = targets.get(i)
machine_builds["$machine"] = {
node {
try {
stage("checkout $machine") {
checkout scm
}
stage("setup-env $machine") {
sh "./scripts/setup-env.sh"
}
stage("fetch $machine") {
sh "GIT_LOCAL_REF_DIR=/srv/git-cache/ ./scripts/fetch.sh master"
}
stage("build $machine") {
sh "MACHINE=${machine} ./scripts/build.sh"
}
} catch (e) {
echo "Caught: ${e}"
throw e
} finally {
stage("push build cache $machine") {
sh "./scripts/publish-build-cache.sh master"
}
stage("cleanup $machine") {
sh "./scripts/cleanup-env.sh"
deleteDir()
}
}
}
}
}
parallel machine_builds