diff options
author | Alexandru Avadanii <Alexandru.Avadanii@enea.com> | 2018-12-14 15:25:40 +0100 |
---|---|---|
committer | Alexandru Avadanii <Alexandru.Avadanii@enea.com> | 2018-12-14 14:43:59 +0000 |
commit | 79c56150533ec77e73bede445e74960affbbef67 (patch) | |
tree | 23b358ecb3358de1fdad18bb4251e7f58b12273e | |
parent | 5bde8d66b7a2d62e53c5978e8f4d8d6752d2cb24 (diff) |
[docker] deploy.sh: Use tag for stable branchopnfv-7.1.0
Outside OPNFV Jenkins (i.e. when manually cloning the OPNFV Fuel
repo and starting a deploy), the Docker tag used to default to
'latest' unless the user specifically set it to 'gambia'.
Rely on 'defaultbranch' setting in .gitreview to determine the
appropiate Docker tag.
Change-Id: I7e6b0706597d84d7cd5dc077499da78031aa61af
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
(cherry picked from commit 4ad7cf5046bbfb90d11f6c172475d75fad257149)
-rwxr-xr-x | ci/deploy.sh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ci/deploy.sh b/ci/deploy.sh index a61946e6c..0e789e8c1 100755 --- a/ci/deploy.sh +++ b/ci/deploy.sh @@ -131,6 +131,8 @@ DEPLOY_DIR=$(cd "${MCP_REPO_ROOT_PATH}/mcp/scripts"; pwd) MCP_STORAGE_DIR='/var/lib/opnfv/tmpdir' URI_REGEXP='(file|https?|ftp)://.*' BASE_CONFIG_URI="file://${MCP_REPO_ROOT_PATH}/mcp/scripts/pharos" +OPNFV_BRANCH=$(sed -ne 's/defaultbranch=//p' "${MCP_REPO_ROOT_PATH}/.gitreview") +DEF_DOCKER_TAG=$(basename "${OPNFV_BRANCH/master/latest}") # Customize deploy workflow DRY_RUN=${DRY_RUN:-0} @@ -139,7 +141,7 @@ USE_EXISTING_INFRA=${USE_EXISTING_INFRA:-0} NO_DEPLOY_ENVIRONMENT=${NO_DEPLOY_ENVIRONMENT:-0} ERASE_ENV=${ERASE_ENV:-0} MCP_VCP=${MCP_VCP:-1} -MCP_DOCKER_TAG=${MCP_DOCKER_TAG:-latest} +MCP_DOCKER_TAG=${MCP_DOCKER_TAG:-${DEF_DOCKER_TAG}} MCP_CMP_SS=${MCP_CMP_SS:-0} source "${DEPLOY_DIR}/globals.sh" |