From 8e55abc784276aaa3dacd30b69a4729a0a439436 Mon Sep 17 00:00:00 2001 From: Alexandru Avadanii Date: Fri, 24 Aug 2018 17:19:24 +0200 Subject: [build.sh] Enable push, minor fixes * default to enable pushing to public docker registry; * fix prerequisites path; * fix unknown terminal in Jenkins jobs; JIRA: FUEL-383 Change-Id: Ie27dfbca6965c218475060da390a82921799b044 Signed-off-by: Alexandru Avadanii --- ci/build.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'ci/build.sh') diff --git a/ci/build.sh b/ci/build.sh index 313edaed4..cb9fe6bcb 100755 --- a/ci/build.sh +++ b/ci/build.sh @@ -31,10 +31,13 @@ MCP_REPO_ROOT_PATH=$(readlink -f "$(dirname "${BASH_SOURCE[0]}")/..") DEPLOY_DIR=$(cd "${MCP_REPO_ROOT_PATH}/mcp/scripts"; pwd) DOCKER_DIR=$(cd "${MCP_REPO_ROOT_PATH}/docker"; pwd) DOCKER_TAG=${1:-latest} +DOCKER_PUSH=${2---push} # pass an empty second arg to disable push source "${DEPLOY_DIR}/globals.sh" source "${DEPLOY_DIR}/lib.sh" +[ ! "${TERM:-unknown}" = 'unknown' ] || export TERM=vt220 + # # END of variables to customize ############################################################################## @@ -52,7 +55,7 @@ umask 0000 # Clone git submodules and apply our patches make -C "${MCP_REPO_ROOT_PATH}/mcp/patches" deepclean patches-import -pushd "${DOCKER_DIR}" > /dev/null +pushd "${DEPLOY_DIR}" > /dev/null # Install distro packages and pip-managed prerequisites notify "[NOTE] Installing required build-time distro and pip pkgs" 2 @@ -60,6 +63,9 @@ jumpserver_pkg_install 'build' pip install pipenv --user docker_install +popd > /dev/null +pushd "${DOCKER_DIR}" > /dev/null + pipenv --two pipenv install pipenv shell \ @@ -69,7 +75,8 @@ pipenv shell \ --dist-rel=xenial \ --formula-rev=nightly \ --opnfv-tag='${DOCKER_TAG}' \ - --salt='stable 2017.7'; \ + --salt='stable 2017.7' \ + ${DOCKER_PUSH}; \ exit" popd > /dev/null -- cgit 1.2.3-korg