Skip to content

Commit dbe84d3

Browse files
committed
Update Jenkinsfile with more steps
Adding back multiple-daemon tests support too Signed-off-by: Vincent Demeester <[email protected]>
1 parent 43788ef commit dbe84d3

File tree

3 files changed

+22
-11
lines changed

3 files changed

+22
-11
lines changed

Diff for: Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# This file describes the standard way to build libcompose, using docker
2-
FROM golang:1.6.0
2+
FROM golang:1.6.2
33

44

55
# virtualenv is necessary to run acceptance tests

Diff for: Jenkinsfile

+20-9
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,33 @@
1+
12
wrappedNode(label: 'linux && x86_64') {
23
deleteDir()
34
checkout scm
45
def image
56
try {
6-
// TODO: split up into phases, create real test reports, etc.
77
stage "build image"
88
image = docker.build("dockerbuildbot/libcompose:${gitCommit()}")
99

10-
stage "validate, test, build"
11-
withEnv(["TESTVERBOSE=1", "LIBCOMPOSE_IMAGE=${image.id}"]) {
12-
withChownWorkspace {
13-
timeout(60) {
14-
sh "make -e all"
15-
}
16-
}
17-
}
10+
stage "validate"
11+
makeTask(image, "validate")
12+
13+
stage "test"
14+
makeTask(image, "test", ["TESTVERBOSE=1", "DAEMON_VERSION=all"])
15+
16+
stage "build"
17+
makeTask(image, "cross-binary")
1818
} finally {
1919
try { archive "bundles" } catch (Exception exc) {}
2020
if (image) { sh "docker rmi ${image.id} ||:" }
2121
}
2222
}
23+
24+
def makeTask(image, task, envVars=null) {
25+
// could send in the full list of envVars for each call or provide default env vars like this:
26+
withEnv((envVars ?: []) + ["LIBCOMPOSE_IMAGE=${image.id}"]) { // would need `def image` at top level of file instead of in the nested block
27+
withChownWorkspace {
28+
timeout(60) {
29+
sh "make -e ${task}"
30+
}
31+
}
32+
}
33+
}

Diff for: README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# libcompose
22

33
[![GoDoc](https://godoc.org/github.com/docker/libcompose?status.png)](https://godoc.org/github.com/docker/libcompose)
4-
[![Jenkins Build Status](https://jenkins.dockerproject.org/view/Libcompose/job/Libcompose%20Master/badge/icon)](https://jenkins.dockerproject.org/view/Libcompose/job/Libcompose%20Master/)
4+
[![Build Status](https://jenkins.dockerproject.org/job/docker/job/libcompose/branch/master/badge/icon)](https://jenkins.dockerproject.org/job/docker/job/libcompose/branch/master/)
55

66
A Go library for Docker Compose. It does everything the command-line tool does, but from within Go -- read Compose files, start them, scale them, etc.
77

0 commit comments

Comments
 (0)