diff options
author | Alexandru Avadanii <Alexandru.Avadanii@enea.com> | 2018-11-21 16:57:10 +0100 |
---|---|---|
committer | Alexandru Avadanii <Alexandru.Avadanii@enea.com> | 2018-11-29 15:16:02 +0000 |
commit | bf4d4728dd3ec729aa79fc0935239e5fda007fd7 (patch) | |
tree | 20678dabbc7d076a2a617a4dca79d844899a43bf /ci/build.sh | |
parent | 6ca645482675c02d3534b10cd57202ec3151848c (diff) |
[docker] build: Allow cache invalidation
While at it, fix emoji issues with latest virtualenv [1].
JIRA: FUEL-398
[1] https://github.com/pypa/pipenv/issues/3223
Change-Id: Ice5937222bf75c1ddadc6b9f1994635bc10faf57
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
(cherry picked from commit f03a33bc58135acc7e4420efaaf34c26a32d6142)
Diffstat (limited to 'ci/build.sh')
-rwxr-xr-x | ci/build.sh | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/ci/build.sh b/ci/build.sh index 67b6d46d8..108ce139a 100755 --- a/ci/build.sh +++ b/ci/build.sh @@ -32,12 +32,14 @@ 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 +CACHE_INVALIDATE=${CACHE_INVALIDATE:-0} source "${DEPLOY_DIR}/globals.sh" source "${DEPLOY_DIR}/lib.sh" source "${DEPLOY_DIR}/lib_jump_common.sh" [ ! "${TERM:-unknown}" = 'unknown' ] || export TERM=vt220 +[ "${CACHE_INVALIDATE}" = 0 ] || CACHE_INVALIDATE=$(date +%s) # # END of variables to customize @@ -69,11 +71,10 @@ docker_install popd > /dev/null pushd "${DOCKER_DIR}" > /dev/null -python -m pipenv --two -env VIRTUALENV_ALWAYS_COPY=1 python -m pipenv install -env VIRTUALENV_ALWAYS_COPY=1 python -m pipenv install invoke +env PIPENV_HIDE_EMOJIS=1 VIRTUALENV_ALWAYS_COPY=1 python -m pipenv --two install +env PIPENV_HIDE_EMOJIS=1 VIRTUALENV_ALWAYS_COPY=1 python -m pipenv install invoke # shellcheck disable=SC2086 -python -m pipenv run \ +env PIPENV_HIDE_EMOJIS=1 python -m pipenv run \ invoke build saltmaster-reclass \ --require 'salt salt-formulas opnfv reclass tini-saltmaster' \ --dist=ubuntu \ @@ -81,6 +82,8 @@ python -m pipenv run \ --formula-rev=nightly \ --opnfv-tag="${DOCKER_TAG}" \ --salt='stable 2017.7' \ + --build-arg-extra " \ + CACHE_INVALIDATE=\"${CACHE_INVALIDATE}\"" \ ${DOCKER_PUSH} popd > /dev/null |