summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2018-12-14 15:25:40 +0100
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2018-12-14 15:27:53 +0100
commit4ad7cf5046bbfb90d11f6c172475d75fad257149 (patch)
tree46332d2a29243b8dfa5fbb4ee0fe36e2a90b815c
parentc6260640d64a366499aa90f36f1b760612afb0d7 (diff)
[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 <Alexandru.Avadanii@enea.com>
-rwxr-xr-xci/deploy.sh4
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"