diff options
author | 2020-01-26 14:25:05 +0100 | |
---|---|---|
committer | 2020-01-26 15:43:31 +0100 | |
commit | fccf558f0c55c0b26448961a97d8edae3dd7db4d (patch) | |
tree | a28b97fed8a0eb407026b6089b356ab973541116 /ci | |
parent | 04f7737967a1a9e84c6e17482acd466b46eebc48 (diff) |
docker build, deploy: Switch tooling to python3
Python2.7 is deprecated and packages are starting to enforce py3
usage (e.g. dockermake recently started supporting only 3.6).
Switch pipenv to python3, but allow pyhton3.5 by pinning dockermake
to v0.8 since Ubuntu Xenial does not have python3.6 easily available.
While at it, switch deploy tooling (PDF/IDF configuration parsing)
from python2 to pyhton3 too and fix some jumphost package requirements.
Change-Id: Id66d08d0f51a1bc35c1d78c1956df832a5536bde
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Diffstat (limited to 'ci')
-rwxr-xr-x | ci/build.sh | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/ci/build.sh b/ci/build.sh index 8fab2ca01..6119472ec 100755 --- a/ci/build.sh +++ b/ci/build.sh @@ -56,26 +56,25 @@ trap do_exit SIGINT SIGTERM EXIT # Set no restrictive umask so that Jenkins can remove any residuals umask 0000 -# Clone git submodules and apply our patches -make -C "${MCP_REPO_ROOT_PATH}/mcp/patches" deepclean patches-import - pushd "${DEPLOY_DIR}" > /dev/null # Install distro packages and pip-managed prerequisites -PYTHON_BIN_PATH="$(python -m site --user-base)/bin" -PATH="$PATH:$PYTHON_BIN_PATH" notify "[NOTE] Installing required build-time distro and pip pkgs" 2 jumpserver_pkg_install 'build' -python -m pip install --upgrade pipenv --user +PYTHON_BIN_PATH="$(python3 -m site --user-base)/bin" +PATH="$PATH:$PYTHON_BIN_PATH" +# Clone git submodules and apply our patches +make -C "${MCP_REPO_ROOT_PATH}/mcp/patches" deepclean patches-import +python3 -m pip install --upgrade pipenv --user docker_install popd > /dev/null pushd "${DOCKER_DIR}" > /dev/null -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 +env PIPENV_HIDE_EMOJIS=1 VIRTUALENV_ALWAYS_COPY=1 python3 -m pipenv --three install +env PIPENV_HIDE_EMOJIS=1 VIRTUALENV_ALWAYS_COPY=1 python3 -m pipenv install invoke # shellcheck disable=SC2086 -env PIPENV_HIDE_EMOJIS=1 python -m pipenv run \ +env PIPENV_HIDE_EMOJIS=1 python3 -m pipenv run \ invoke build saltmaster-reclass \ --require 'salt salt-formulas opnfv reclass tini-saltmaster' \ --dist=ubuntu \ @@ -87,7 +86,7 @@ env PIPENV_HIDE_EMOJIS=1 python -m pipenv run \ CACHE_INVALIDATE=\"${CACHE_INVALIDATE}\"" \ ${DOCKER_PUSH} -env PIPENV_HIDE_EMOJIS=1 python -m pipenv run \ +env PIPENV_HIDE_EMOJIS=1 python3 -m pipenv run \ invoke build saltminion-maas \ --require 'maas' \ --dist=ubuntu \ |