summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2018-08-24 17:19:24 +0200
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2018-08-24 17:26:18 +0200
commit8e55abc784276aaa3dacd30b69a4729a0a439436 (patch)
tree0a001e89a078fdd9eb5c60a5b01445a65aed3ec4
parent7e825a17e1e31eb4010f0c646314263f26164dab (diff)
[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 <Alexandru.Avadanii@enea.com>
-rwxr-xr-xci/build.sh11
1 files changed, 9 insertions, 2 deletions
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