[TAR-465] Jenkinsfile: Test the correct branch
This commit ensures that we test the correct branches of Docker when making packaging changes. Signed-off-by: Dave Tucker <dt@docker.com> (cherry picked from commit 1ef9fb3f0b2b8016b50c6c71f2d14bea16faff35) Upstream-commit: 5e59ff8a5e8ea44444aa4f22a8baf12e091bcc76 Component: packaging
This commit is contained in:
22
components/packaging/Jenkinsfile
vendored
22
components/packaging/Jenkinsfile
vendored
@ -8,7 +8,7 @@ def genBranch(String arch) {
|
||||
wrappedNode(label: "linux&&${arch}", cleanWorkspace: true) {
|
||||
try {
|
||||
checkout scm
|
||||
sh("git clone https://github.com/moby/moby.git engine")
|
||||
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')
|
||||
@ -18,14 +18,18 @@ def genBranch(String arch) {
|
||||
}]
|
||||
}
|
||||
|
||||
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 clone https://github.com/moby/moby.git')
|
||||
sh('make VERSION=0.0.1-dev DOCKER_BUILD_PKGS=ubuntu-xenial ENGINE_DIR=$(pwd)/moby CLI_DIR=$(pwd)/cli deb')
|
||||
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=ubuntu-xenial ENGINE_DIR=$(pwd)/engine CLI_DIR=$(pwd)/cli deb')
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -34,8 +38,10 @@ test_steps = [
|
||||
wrappedNode(label: 'ubuntu && 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 VERSION=0.0.1-dev DOCKER_BUILD_PKGS=centos-7 ENGINE_DIR=$(pwd)/moby CLI_DIR=$(pwd)/cli rpm')
|
||||
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=centos-7 ENGINE_DIR=$(pwd)/engine CLI_DIR=$(pwd)/cli rpm')
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -44,8 +50,10 @@ test_steps = [
|
||||
wrappedNode(label: 'ubuntu && 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 VERSION=0.0.1-dev DOCKER_BUILD_PKGS=static-linux ENGINE_DIR=$(pwd)/moby CLI_DIR=$(pwd)/cli static')
|
||||
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')
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user