aboutsummaryrefslogtreecommitdiffstats
path: root/mcp
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2018-09-10 03:26:46 +0200
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2018-09-10 04:00:06 +0200
commit546d3927a8ecd822b319a8eac1f98983df63eb3a (patch)
tree59abc1dade8fa9ff9bed74e40ef99568e9a1dae1 /mcp
parent36169a124d25dd77b7525cd5223525db4342c208 (diff)
[docker] Add MCP_DOCKER_TAG env var
Allow skipping docker pull for verify jobs by setting the new env var to 'verify'. JIRA: FUEL-383 Change-Id: If8e2f66b5ccdac5c3911eeabfc2ba9c0eba61093 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Diffstat (limited to 'mcp')
-rw-r--r--mcp/scripts/docker-compose/docker-compose.yaml.j22
-rw-r--r--mcp/scripts/lib.sh4
2 files changed, 4 insertions, 2 deletions
diff --git a/mcp/scripts/docker-compose/docker-compose.yaml.j2 b/mcp/scripts/docker-compose/docker-compose.yaml.j2
index 7099e4fda..ed0400da5 100644
--- a/mcp/scripts/docker-compose/docker-compose.yaml.j2
+++ b/mcp/scripts/docker-compose/docker-compose.yaml.j2
@@ -13,7 +13,7 @@ version: '2'
services:
opnfv-fuel-salt-master:
container_name: "fuel"
- image: "opnfv/fuel:saltmaster-reclass-latest"
+ image: "opnfv/fuel:saltmaster-reclass-{{ conf.MCP_DOCKER_TAG }}"
networks:
- mcpcontrol
- pxebr
diff --git a/mcp/scripts/lib.sh b/mcp/scripts/lib.sh
index cc88f9b54..6572074f5 100644
--- a/mcp/scripts/lib.sh
+++ b/mcp/scripts/lib.sh
@@ -493,6 +493,9 @@ function prepare_containers {
docker-compose --version > /dev/null 2>&1 || COMPOSE_PREFIX="${image_dir}/"
"${COMPOSE_PREFIX}docker-compose" -f docker-compose/docker-compose.yaml down
+ if [ ! "${MCP_DOCKER_TAG}" = 'verify' ]; then
+ "${COMPOSE_PREFIX}docker-compose" -f docker-compose/docker-compose.yaml pull
+ fi
sudo rm -rf "${image_dir}/"{salt,hosts,pki} "${image_dir}/nodes/"*
mkdir -p "${image_dir}/salt/"{master.d,minion.d}
touch "${image_dir}/hosts"
@@ -502,7 +505,6 @@ function start_containers {
local image_dir=$1
[ -n "${image_dir}" ] || exit 1
docker-compose --version > /dev/null 2>&1 || COMPOSE_PREFIX="${image_dir}/"
- "${COMPOSE_PREFIX}docker-compose" -f docker-compose/docker-compose.yaml pull
"${COMPOSE_PREFIX}docker-compose" -f docker-compose/docker-compose.yaml up -d
}