From 4ad7cf5046bbfb90d11f6c172475d75fad257149 Mon Sep 17 00:00:00 2001 From: Alexandru Avadanii Date: Fri, 14 Dec 2018 15:25:40 +0100 Subject: [docker] deploy.sh: Use tag for stable branch 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 --- ci/deploy.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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" -- cgit 1.2.3-korg