forked from docker/docker-ce-packaging
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
72 lines (65 loc) · 1.88 KB
/
Jenkinsfile
File metadata and controls
72 lines (65 loc) · 1.88 KB
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
#!groovy
def genBranch(String arch) {
return [
"${arch}": { ->
stage("Build engine image on ${arch}") {
wrappedNode(label: "linux&&${arch}", cleanWorkspace: true) {
try {
checkout scm
sh("git clone https://github.com/docker/engine.git engine")
sh('make ENGINE_DIR=$(pwd)/engine image')
} finally {
sh('make ENGINE_DIR=$(pwd)/engine clean-image clean-engine')
}
}
}
}]
}
def branch = env.CHANGE_TARGET ?: env.BRANCH_NAME
test_steps = [
'deb': { ->
stage('Ubuntu Xenial Debian Package') {
wrappedNode(label: 'ubuntu && x86_64', cleanWorkspace: true) {
checkout scm
sh('git clone https://github.com/docker/cli.git')
sh("git -C cli checkout $branch")
sh('git clone https://github.com/docker/engine.git')
sh("git -C engine checkout $branch")
sh('make -C deb VERSION=0.0.1-dev ENGINE_DIR=$(pwd)/engine CLI_DIR=$(pwd)/cli ubuntu-xenial')
}
}
},
'rpm': { ->
stage('Centos 7 RPM Package') {
wrappedNode(label: 'ubuntu && x86_64', cleanWorkspace: true) {
checkout scm
sh('git clone https://github.com/docker/cli.git')
sh("git -C cli checkout $branch")
sh('git clone https://github.com/docker/engine.git')
sh("git -C engine checkout $branch")
sh('make -C rpm VERSION=0.0.1-dev ENGINE_DIR=$(pwd)/engine CLI_DIR=$(pwd)/cli centos-7')
}
}
},
'static': { ->
stage('Static Linux Binaries') {
wrappedNode(label: 'ubuntu && x86_64', cleanWorkspace: true) {
checkout scm
sh('git clone https://github.com/docker/cli.git')
sh("git -C cli checkout $branch")
sh('git clone https://github.com/docker/engine.git')
sh("git -C engine checkout $branch")
sh('make VERSION=0.0.1-dev DOCKER_BUILD_PKGS=static-linux ENGINE_DIR=$(pwd)/engine CLI_DIR=$(pwd)/cli static')
}
}
},
]
arches = [
"x86_64",
"aarch64",
"armhf"
]
arches.each {
test_steps << genBranch(it)
}
parallel(test_steps)