forked from docker/docker-install
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
75 lines (62 loc) · 1.63 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#!groovy
def verifyTargets = [
'x86_64-verify-install-centos-7',
'x86_64-verify-install-fedora-29',
'x86_64-verify-install-ubuntu-xenial',
'x86_64-verify-install-ubuntu-bionic',
]
def armhfverifyTargets = [
'armhf-verify-install-ubuntu-xenial',
'armhf-verify-install-ubuntu-bionic',
]
def s390xverifyTargets = [
's390x-verify-install-ubuntu-xenial',
's390x-verify-install-ubuntu-bionic',
]
def aarch64verifyTargets = [
'aarch64-verify-install-ubuntu-xenial',
'aarch64-verify-install-ubuntu-bionic',
'aarch64-verify-install-centos-7',
]
def ppc64leverifyTargets = [
'ppc64le-verify-install-ubuntu-xenial',
'ppc64le-verify-install-ubuntu-bionic',
]
def genVerifyJob(String t, String label) {
return [ "${t}" : { ->
stage("${t}") {
wrappedNode(label: label, cleanWorkspace: true) {
checkout scm
channel = 'test'
if ("${env.JOB_NAME}".endsWith('get.docker.com')) {
channel='edge'
}
sh("make CHANNEL_TO_TEST=${channel} clean ${t}")
archiveArtifacts '*-verify-install-*'
}
}
} ]
}
wrappedNode(label: 'aufs', cleanWorkspace: true) {
stage('Shellcheck') {
checkout scm
sh('make shellcheck')
}
}
def verifyJobs = [:]
for (t in verifyTargets) {
verifyJobs << genVerifyJob(t, 'aufs')
}
for (t in armhfverifyTargets) {
verifyJobs << genVerifyJob(t, 'armhf')
}
for (t in s390xverifyTargets) {
verifyJobs << genVerifyJob(t, 's390x-ubuntu-1604')
}
for (t in aarch64verifyTargets) {
verifyJobs << genVerifyJob(t, 'aarch64')
}
for (t in ppc64leverifyTargets) {
verifyJobs << genVerifyJob(t, 'ppc64le-ubuntu-1604')
}
parallel(verifyJobs)