Skip to content

Commit 15bdbd7

Browse files
Merge component 'engine' from [email protected]:docker/engine master
2 parents 1de2e7b + dd4b0d7 commit 15bdbd7

2 files changed

Lines changed: 31 additions & 86 deletions

File tree

components/engine/Jenkinsfile

Lines changed: 29 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,7 @@
1-
def withGithubStatus(String context, Closure cl) {
2-
def setGithubStatus = { String state ->
3-
try {
4-
def backref = "${BUILD_URL}flowGraphTable/"
5-
def reposSourceURL = scm.repositories[0].getURIs()[0].toString()
6-
step(
7-
$class: 'GitHubCommitStatusSetter',
8-
contextSource: [$class: "ManuallyEnteredCommitContextSource", context: context],
9-
errorHandlers: [[$class: 'ShallowAnyErrorHandler']],
10-
reposSource: [$class: 'ManuallyEnteredRepositorySource', url: reposSourceURL],
11-
statusBackrefSource: [$class: 'ManuallyEnteredBackrefSource', backref: backref],
12-
statusResultSource: [$class: 'ConditionalStatusResultSource', results: [[$class: 'AnyBuildResult', state: state]]],
13-
)
14-
} catch (err) {
15-
echo "Exception from GitHubCommitStatusSetter for $context: $err"
16-
}
17-
}
18-
19-
setGithubStatus 'PENDING'
20-
21-
try {
22-
cl()
23-
} catch (err) {
24-
// AbortException signals a "normal" build failure.
25-
if (!(err instanceof hudson.AbortException)) {
26-
echo "Exception in withGithubStatus for $context: $err"
27-
}
28-
setGithubStatus 'FAILURE'
29-
throw err
30-
}
31-
setGithubStatus 'SUCCESS'
32-
}
33-
34-
351
pipeline {
362
agent none
3+
4+
375
options {
386
buildDiscarder(logRotator(daysToKeepStr: '30'))
397
timeout(time: 3, unit: 'HOURS')
@@ -44,8 +12,8 @@ pipeline {
4412
booleanParam(name: 'z', defaultValue: true, description: 'IBM Z (s390x) Build/Test')
4513
booleanParam(name: 'powerpc', defaultValue: true, description: 'PowerPC (ppc64le) Build/Test')
4614
booleanParam(name: 'vendor', defaultValue: true, description: 'Vendor')
47-
booleanParam(name: 'windowsRS1', defaultValue: true, description: 'Windows 2016 (RS1) Build/Test')
48-
booleanParam(name: 'windowsRS5', defaultValue: true, description: 'Windows 2019 (RS5) Build/Test')
15+
booleanParam(name: 'windowsRS1', defaultValue: false, description: 'Windows 2016 (RS1) Build/Test')
16+
booleanParam(name: 'windowsRS5', defaultValue: false, description: 'Windows 2019 (RS5) Build/Test')
4917
}
5018
stages {
5119
stage('Build') {
@@ -55,13 +23,10 @@ pipeline {
5523
beforeAgent true
5624
expression { params.janky }
5725
}
58-
agent {
59-
node {
60-
label 'ubuntu-1604-overlay2-stable'
61-
}
62-
}
26+
agent { label 'amd64 && ubuntu-1804 && overlay2' }
27+
environment { DOCKER_BUILDKIT='1' }
28+
6329
steps {
64-
withGithubStatus('janky') {
6530
sh '''
6631
# todo: include ip_vs in base image
6732
sudo modprobe ip_vs
@@ -84,7 +49,6 @@ pipeline {
8449
echo "Building e2e image"
8550
docker build --build-arg DOCKER_GITCOMMIT=$GITCOMMIT -t moby-e2e-test -f Dockerfile.e2e .
8651
'''
87-
}
8852
}
8953
post {
9054
always {
@@ -96,10 +60,11 @@ pipeline {
9660
docker run --rm -v "$WORKSPACE:/workspace" busybox chown -R "$(id -u):$(id -g)" /workspace
9761
'''
9862
sh '''
99-
echo "Creating bundles.tar.gz"
100-
(find bundles -name '*.log' -o -name '*.prof' -o -name integration.test | xargs tar -czf bundles.tar.gz) || true
63+
echo "Creating janky-bundles.tar.gz"
64+
(find bundles -name '*.log' -o -name '*.prof' -o -name integration.test | xargs tar -czf janky-bundles.tar.gz) || true
10165
'''
102-
archiveArtifacts artifacts: 'bundles.tar.gz'
66+
archiveArtifacts artifacts: 'janky-bundles.tar.gz'
67+
deleteDir()
10368
}
10469
}
10570
}
@@ -108,13 +73,9 @@ pipeline {
10873
beforeAgent true
10974
expression { params.experimental }
11075
}
111-
agent {
112-
node {
113-
label 'ubuntu-1604-aufs-stable'
114-
}
115-
}
76+
agent { label 'amd64 && ubuntu-1804 && overlay2' }
77+
environment { DOCKER_BUILDKIT='1' }
11678
steps {
117-
withGithubStatus('experimental') {
11879
sh '''
11980
GITCOMMIT=$(git rev-parse --short HEAD)
12081
docker build --rm --force-rm --build-arg APT_MIRROR=cdn-fastly.deb.debian.org -t docker:${GITCOMMIT}-exp .
@@ -128,7 +89,6 @@ pipeline {
12889
docker:${GITCOMMIT}-exp \
12990
hack/ci/experimental
13091
'''
131-
}
13292
}
13393
post {
13494
always {
@@ -141,9 +101,13 @@ pipeline {
141101
'''
142102
sh '''
143103
echo "Creating bundles.tar.gz"
144-
(find bundles -name '*.log' -o -name '*.prof' -o -name integration.test | xargs tar -czf bundles.tar.gz) || true
104+
(find bundles -name '*.log' -o -name '*.prof' -o -name integration.test | xargs tar -czf experimental-bundles.tar.gz) || true
105+
'''
106+
sh '''
107+
make clean
145108
'''
146-
archiveArtifacts artifacts: 'bundles.tar.gz'
109+
archiveArtifacts artifacts: 'experimental-bundles.tar.gz'
110+
deleteDir()
147111
}
148112
}
149113
}
@@ -152,13 +116,8 @@ pipeline {
152116
beforeAgent true
153117
expression { params.z }
154118
}
155-
agent {
156-
node {
157-
label 's390x-ubuntu-1604'
158-
}
159-
}
119+
agent { label 's390x-ubuntu-1604' }
160120
steps {
161-
withGithubStatus('z') {
162121
sh '''
163122
GITCOMMIT=$(git rev-parse --short HEAD)
164123
@@ -175,7 +134,6 @@ pipeline {
175134
docker-s390x:$GITCOMMIT \
176135
hack/ci/z
177136
'''
178-
}
179137
}
180138
post {
181139
always {
@@ -188,9 +146,10 @@ pipeline {
188146
'''
189147
sh '''
190148
echo "Creating bundles.tar.gz"
191-
find bundles -name '*.log' | xargs tar -czf bundles.tar.gz
149+
find bundles -name '*.log' | xargs tar -czf s390x-bundles.tar.gz
192150
'''
193-
archiveArtifacts artifacts: 'bundles.tar.gz'
151+
archiveArtifacts artifacts: 's390x-bundles.tar.gz'
152+
deleteDir()
194153
}
195154
}
196155
}
@@ -199,13 +158,8 @@ pipeline {
199158
beforeAgent true
200159
expression { params.powerpc }
201160
}
202-
agent {
203-
node {
204-
label 'ppc64le-ubuntu-1604'
205-
}
206-
}
161+
agent { label 'ppc64le-ubuntu-1604' }
207162
steps {
208-
withGithubStatus('powerpc') {
209163
sh '''
210164
GITCOMMIT=$(git rev-parse --short HEAD)
211165
@@ -222,7 +176,6 @@ pipeline {
222176
docker-powerpc:$GITCOMMIT \
223177
hack/ci/powerpc
224178
'''
225-
}
226179
}
227180
post {
228181
always {
@@ -235,9 +188,10 @@ pipeline {
235188
'''
236189
sh '''
237190
echo "Creating bundles.tar.gz"
238-
find bundles -name '*.log' | xargs tar -czf bundles.tar.gz
191+
find bundles -name '*.log' | xargs tar -czf powerpc-bundles.tar.gz
239192
'''
240-
archiveArtifacts artifacts: 'bundles.tar.gz'
193+
archiveArtifacts artifacts: 'powerpc-bundles.tar.gz'
194+
deleteDir()
241195
}
242196
}
243197
}
@@ -246,13 +200,9 @@ pipeline {
246200
beforeAgent true
247201
expression { params.vendor }
248202
}
249-
agent {
250-
node {
251-
label 'ubuntu-1604-aufs-stable'
252-
}
253-
}
203+
agent { label 'amd64 && ubuntu-1804 && overlay2' }
204+
environment { DOCKER_BUILDKIT='1' }
254205
steps {
255-
withGithubStatus('vendor') {
256206
sh '''
257207
GITCOMMIT=$(git rev-parse --short HEAD)
258208
@@ -266,7 +216,6 @@ pipeline {
266216
-e TIMEOUT=120m dockerven:$GITCOMMIT \
267217
hack/validate/vendor
268218
'''
269-
}
270219
}
271220
}
272221
stage('windowsRS1') {
@@ -281,13 +230,11 @@ pipeline {
281230
}
282231
}
283232
steps {
284-
withGithubStatus('windowsRS1') {
285233
powershell '''
286234
$ErrorActionPreference = 'Stop'
287235
.\\hack\\ci\\windows.ps1
288236
exit $LastExitCode
289237
'''
290-
}
291238
}
292239
}
293240
stage('windowsRS5-process') {
@@ -302,13 +249,11 @@ pipeline {
302249
}
303250
}
304251
steps {
305-
withGithubStatus('windowsRS5-process') {
306252
powershell '''
307253
$ErrorActionPreference = 'Stop'
308254
.\\hack\\ci\\windows.ps1
309255
exit $LastExitCode
310256
'''
311-
}
312257
}
313258
}
314259
}

components/engine/integration-cli/docker_cli_swarm_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1312,7 +1312,7 @@ func (s *DockerSwarmSuite) TestSwarmRotateUnlockKey(c *check.C) {
13121312
// an issue sometimes prevents leader to be available right away
13131313
outs, err = d.Cmd("node", "ls")
13141314
if err != nil && retry < 5 {
1315-
if strings.Contains(err.Error(), "swarm does not have a leader") {
1315+
if strings.Contains(outs, "swarm does not have a leader") {
13161316
retry++
13171317
time.Sleep(3 * time.Second)
13181318
continue
@@ -1404,7 +1404,7 @@ func (s *DockerSwarmSuite) TestSwarmClusterRotateUnlockKey(c *check.C) {
14041404
// an issue sometimes prevents leader to be available right away
14051405
outs, err = d.Cmd("node", "ls")
14061406
if err != nil && retry < 5 {
1407-
if strings.Contains(err.Error(), "swarm does not have a leader") {
1407+
if strings.Contains(outs, "swarm does not have a leader") {
14081408
retry++
14091409
time.Sleep(3 * time.Second)
14101410
continue

0 commit comments

Comments
 (0)