-
Notifications
You must be signed in to change notification settings - Fork 22
/
Jenkinsfile
58 lines (54 loc) · 1.18 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
def images = ["ubuntu:bionic", "ubuntu:xenial", "debian:stretch", "fedora:30", "centos:7"]
def tasks = [:]
images.each { image ->
tasks["${image}"] = {
node {
lock("zlog-build") {
stage('checkout') {
checkout scm
}
stage('build deps image') {
sh "ci/build_deps_image.sh ${image}"
}
stage('build and test') {
sh "ci/script.sh ${image}"
}
}
}
}
}
tasks["fedora:30:pkg"] = {
node {
lock("zlog-build") {
stage('checkout') {
checkout scm
}
stage('build deps image') {
sh "BUILD_PKG=yes ci/build_deps_image.sh fedora:30"
}
stage('build and test') {
sh "BUILD_PKG=yes ci/script.sh fedora:30"
}
}
}
}
//for (int i = 0; i < images.size(); i++) {
// tasks["${images[i]}"] = {
// node {
// lock("zlog-build") {
// stage('checkout') {
// checkout scm
// }
// stage('build deps image') {
// sh "ci/build_deps_image.sh ${images[i]}"
// }
// stage('build and test') {
// sh "ci/script.sh ${images[i]}"
// }
// }
// }
// }
//}
stage("matrix") {
parallel tasks
}