2 ##############################################################################
3 # Copyright (c) 2017 ZTE and others.
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
11 echo "--------------------------------------------------------"
12 echo "POD: $NODE_NAME"
13 echo "Scenario: $DEPLOY_SCENARIO"
14 echo "INSTALLER: $INSTALLER_TYPE"
15 echo "INSTALLER_IP: $INSTALLER_IP"
16 echo "--------------------------------------------------------"
18 echo "Qtip: Pulling docker image: opnfv/qtip:${DOCKER_TAG}"
19 docker pull opnfv/qtip:$DOCKER_TAG >/dev/null
21 envs="INSTALLER_TYPE=${INSTALLER_TYPE} -e INSTALLER_IP=${INSTALLER_IP}
22 -e POD_NAME=${NODE_NAME} -e SCENARIO=${DEPLOY_SCENARIO}"
24 cmd=" docker run -id -e $envs opnfv/qtip:${DOCKER_TAG} /bin/bash"
25 echo "Qtip: Running docker command: ${cmd}"
28 container_id=$(docker ps | grep "opnfv/qtip:${DOCKER_TAG}" | awk '{print $1}' | head -1)
29 if [ $(docker ps | grep 'opnfv/qtip' | wc -l) == 0 ]; then
30 echo "The container opnfv/qtip with ID=${container_id} has not been properly started. Exiting..."
34 echo "The container ID is: ${container_id}"
35 QTIP_REPO=/home/opnfv/repos/qtip
37 docker exec -t ${container_id} bash -c "bash ${QTIP_REPO}/tests/ci/run_ci.sh"