[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mesos-commits
Subject:    mesos git commit: Added Jenkins script for building Mesos distro Docker image.
From:       jieyu () apache ! org
Date:       2018-02-27 4:56:29
Message-ID: 92a27fc3dfa94937bd7cd26fc3184e6c () git ! apache ! org
[Download RAW message or body]

Repository: mesos
Updated Branches:
  refs/heads/master d00a28041 -> 733386539


Added Jenkins script for building Mesos distro Docker image.

The script will be used to build and push Docker image that has Mesos
distro installed (based on CentOS).


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/73338653
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/73338653
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/73338653

Branch: refs/heads/master
Commit: 7333865393896a74ea8fe1d2f720926c3a8c210e
Parents: d00a280
Author: Jie Yu <yujie.jay@gmail.com>
Authored: Mon Feb 26 20:55:34 2018 -0800
Committer: Jie Yu <yujie.jay@gmail.com>
Committed: Mon Feb 26 20:56:26 2018 -0800

----------------------------------------------------------------------
 support/jenkins/docker-centos.sh | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/73338653/support/jenkins/docker-centos.sh
                
----------------------------------------------------------------------
diff --git a/support/jenkins/docker-centos.sh b/support/jenkins/docker-centos.sh
new file mode 100644
index 0000000..812799a
--- /dev/null
+++ b/support/jenkins/docker-centos.sh
@@ -0,0 +1,33 @@
+#!/usr/bin/env bash
+
+set -o errexit -o nounset -o pipefail -o verbose
+
+# This script build and push Docker image that has Mesos distro
+# installed (based on CentOS).
+
+CURRENT_DIR="$(cd "$(dirname "$0")"; pwd -P)"
+SUPPORT_DIR="${CURRENT_DIR}/.."
+
+: ${USERNAME:?"Environment variable 'USERNAME' must be set to the username of the \
'Mesos DockerBot' Docker hub account."} +: ${PASSWORD:?"Environment variable \
'PASSWORD' must be set to the password of the 'Mesos DockerBot' Docker hub account."} \
+ +DOCKER_IMAGE_PACKAGING=${DOCKER_IMAGE_PACKAGING:-"mesos/mesos-centos-packaging"}
+DOCKER_IMAGE_DISTRO=${DOCKER_IMAGE_DISTRO:-"mesos/mesos-centos"}
+DOCKER_IMAGE_TAG=`date +%F`
+
+function cleanup {
+  docker rmi $(docker images -q ${DOCKER_IMAGE_PACKAGING}:${DOCKER_IMAGE_TAG}) || \
true +  docker rmi $(docker images -q ${DOCKER_IMAGE_DISTRO}:${DOCKER_IMAGE_TAG}) || \
true +}
+
+trap cleanup EXIT
+
+DOCKER_IMAGE_PACKAGING=${DOCKER_IMAGE_PACKAGING} \
+DOCKER_IMAGE_DISTRO=${DOCKER_IMAGE_DISTRO} \
+DOCKER_IMAGE_TAG=${DOCKER_IMAGE_TAG} \
+"${SUPPORT_DIR}/packaging/centos/build-docker-image.sh"
+
+docker tag ${DOCKER_IMAGE_DISTRO}:${DOCKER_IMAGE_TAG} ${DOCKER_IMAGE_DISTRO}:latest
+docker login -u ${USERNAME} -p ${PASSWORD}
+docker push ${DOCKER_IMAGE_DISTRO}:${DOCKER_IMAGE_TAG}
+docker push ${DOCKER_IMAGE_DISTRO}:latest


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic