From 5b5e980ec31e6a28f0e4149271d07136add01c5c Mon Sep 17 00:00:00 2001 From: Eli Uriegas Date: Thu, 26 Oct 2017 16:02:01 -0700 Subject: [PATCH] Adds initial Jenkinsfile. Signed-off-by: Eli Uriegas Upstream-commit: 31a08611f6b87f71d673ab254471826eed225858 Component: packaging --- components/packaging/Jenkinsfile | 46 ++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 components/packaging/Jenkinsfile diff --git a/components/packaging/Jenkinsfile b/components/packaging/Jenkinsfile new file mode 100644 index 0000000000..bfbf1e8a48 --- /dev/null +++ b/components/packaging/Jenkinsfile @@ -0,0 +1,46 @@ +#!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") + } + }, + 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") + } + } + 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") + } + } +}