Merge pull request #61 from seemethere/fix_jenkinsfile
Make Jenkinsfile actually function Upstream-commit: b53c9642495f3c09e2c95791ab6108fe8733fe2b Component: packaging
This commit is contained in:
70
components/packaging/Jenkinsfile
vendored
70
components/packaging/Jenkinsfile
vendored
@ -1,46 +1,36 @@
|
||||
#!groovy
|
||||
|
||||
def stageWithGithubNotify(String name, Closure cl) {
|
||||
def notify = { String status ->
|
||||
safeGithubNotify([context: name, targetUrl: "${BUILD_URL}/flowGraphTable"] + [status: status])
|
||||
}
|
||||
|
||||
stage(name) {
|
||||
notify 'PENDING'
|
||||
try {
|
||||
cl()
|
||||
} catch (err) {
|
||||
addFailedStage(name)
|
||||
notify 'FAILURE'
|
||||
throw err
|
||||
}
|
||||
notify 'SUCCESS'
|
||||
}
|
||||
}
|
||||
|
||||
parallel {
|
||||
stageWithGithubNotify('Ubuntu Xenial Debian Package') {
|
||||
wrappedNode(label: 'docker-edge && x86_64', cleanWorkspace: true) {
|
||||
checkout scm
|
||||
sh("git clone https://github.com/docker/cli.git")
|
||||
sh("git clone https://github.com/moby/moby.git")
|
||||
sh("make DOCKER_BUILD_PKGS=ubuntu-xenial ENGINE_DIR=moby CLI_DIR=cli deb")
|
||||
test_steps = [
|
||||
'deb': { ->
|
||||
stage('Ubuntu Xenial Debian Package') {
|
||||
wrappedNode(label: 'docker-edge && x86_64', cleanWorkspace: true) {
|
||||
checkout scm
|
||||
sh('git clone https://github.com/docker/cli.git')
|
||||
sh('git clone https://github.com/moby/moby.git')
|
||||
sh('make DOCKER_BUILD_PKGS=ubuntu-xenial ENGINE_DIR=$(pwd)/moby CLI_DIR=$(pwd)/cli deb')
|
||||
}
|
||||
}
|
||||
},
|
||||
stageWithGithubNotify('Centos 7 RPM Package') {
|
||||
wrappedNode(label: 'docker-edge && x86_64', cleanWorkspace: true) {
|
||||
checkout scm
|
||||
sh("git clone https://github.com/docker/cli.git")
|
||||
sh("git clone https://github.com/moby/moby.git")
|
||||
sh("make DOCKER_BUILD_PKGS=centos-7 ENGINE_DIR=moby CLI_DIR=cli rpm")
|
||||
'rpm': { ->
|
||||
stage('Centos 7 RPM Package') {
|
||||
wrappedNode(label: 'docker-edge && x86_64', cleanWorkspace: true) {
|
||||
checkout scm
|
||||
sh('git clone https://github.com/docker/cli.git')
|
||||
sh('git clone https://github.com/moby/moby.git')
|
||||
sh('make DOCKER_BUILD_PKGS=centos-7 ENGINE_DIR=$(pwd)/moby CLI_DIR=$(pwd)/cli rpm')
|
||||
}
|
||||
}
|
||||
}
|
||||
stageWithGithubNotify('Static Linux Binaries') {
|
||||
wrappedNode(label: 'docker-edge && x86_64', cleanWorkspace: true) {
|
||||
checkout scm
|
||||
sh("git clone https://github.com/docker/cli.git")
|
||||
sh("git clone https://github.com/moby/moby.git")
|
||||
sh("make DOCKER_BUILD_PKGS=static-linux ENGINE_DIR=moby CLI_DIR=cli static")
|
||||
},
|
||||
'static': { ->
|
||||
stage('Static Linux Binaries') {
|
||||
wrappedNode(label: 'docker-edge && x86_64', cleanWorkspace: true) {
|
||||
checkout scm
|
||||
sh('git clone https://github.com/docker/cli.git')
|
||||
sh('git clone https://github.com/moby/moby.git')
|
||||
sh('make DOCKER_BUILD_PKGS=static-linux ENGINE_DIR=$(pwd)/moby CLI_DIR=$(pwd)/cli static')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
]
|
||||
|
||||
parallel(test_steps)
|
||||
|
||||
Reference in New Issue
Block a user