1 ####################################
2 # job configuration for qtip
3 ####################################
9 #--------------------------------
11 #--------------------------------
16 brahmaputra: &brahmaputra
18 branch: 'stable/{stream}'
19 gs-pathname: '{stream}'
20 #--------------------------------
21 # POD, INSTALLER, AND BRANCH MAPPING
22 #--------------------------------
24 #--------------------------------
26 - dell-us-testing-bm-1:
28 auto-trigger-name: 'qtip-daily-dell-us-testing-bm-1-trigger'
32 auto-trigger-name: 'brahmaputra-trigger-daily-disabled'
34 - dell-us-deploying-bm3:
36 auto-trigger-name: 'qtip-daily-dell-us-deploying-bm3-trigger'
39 #--------------------------------
41 #--------------------------------
45 auto-trigger-name: 'brahmaputra-trigger-daily-disabled'
46 # - zte-build-1: #would be confirmed with the ZTE lab by tomorrow
50 #--------------------------------
52 - 'qtip-{installer}-{pod}-daily-{stream}'
54 ################################
56 ################################
58 name: 'qtip-{installer}-{pod}-daily-{stream}'
66 - '{installer}-defaults'
69 default: 'os-nosdn-nofeature-ha'
73 credentials-id: '{ssh-credentials}'
78 - '{auto-trigger-name}'
88 recipients: nauman.ahad@xflowresearch.com, mofassir.arif@xflowresearch.com, vikram@nvirters.com
90 ###########################
92 ###########################
98 echo "Qtip: Start Docker and prepare environment"
99 envs="INSTALLER_TYPE=${INSTALLER_TYPE} -e INSTALLER_IP=${INSTALLER_IP} -e NODE_NAME=${NODE_NAME}"
100 suite="TEST_CASE=all"
101 docker pull opnfv/qtip:latest
102 cmd=" docker run -id -e $envs -e $suite opnfv/qtip:latest /bin/bash"
103 echo "Qtip: Running docker run command: ${cmd}"
106 container_id=$(docker ps | grep 'opnfv/qtip:latest' | awk '{print $1}' | head -1)
107 if [ $(docker ps | grep 'opnfv/qtip' | wc -l) == 0 ]; then
108 echo "The container opnfv/qtip with ID=${container_id} has not been properly started. Exiting..."
116 container_id=$(docker ps | grep 'opnfv/qtip:latest' | awk '{print $1}' | head -1)
117 if [[ ! -z ${container_id} ]]; then
118 echo "The container ID is: ${container_id}"
119 QTIP_REPO=/home/opnfv/repos/qtip
120 docker exec -t ${container_id} $QTIP_REPO/docker/run_qtip.sh
122 echo "Container ID not available"
131 echo "Pushing available results to DB"
132 echo "The container id is:"
133 container_id=$(docker ps | grep 'opnfv/qtip:latest' | awk '{print $1}' | head -1)
134 if [[ ! -z ${container_id} ]]; then
135 echo "The condiner ID is: ${container_id}"
136 QTIP_REPO=/home/opnfv/repos/qtip
137 docker exec -t ${container_id} $QTIP_REPO/docker/push_db.sh
139 echo "Container ID not available"
148 echo "Cleaning up QTIP docker containers/images..."
149 # Remove previous running containers if exist
150 if [[ ! -z $(docker ps -a | grep opnfv/qtip) ]]; then
151 echo "Removing existing opnfv/qtip containers..."
152 running_containers=$(docker ps | grep opnfv/qtip | awk '{print $1}')
153 docker stop ${running_containers}
154 all_containers=$(docker ps -a | grep opnfv/qtip | awk '{print $1}')
155 docker rm ${all_containers}
158 # Remove existing images if exist
159 if [[ ! -z $(docker images | grep opnfv/qtip) ]]; then
160 echo "Docker images to remove:"
161 docker images | head -1 && docker images | grep opnfv/qtip
162 image_tags=($(docker images | grep opnfv/qtip | awk '{print $2}'))
163 for tag in "${image_tags[@]}"; do
164 echo "Removing docker image opnfv/qtip:$tag..."
165 docker rmi opnfv/qtip:$tag
174 name: 'qtip-daily-dell-us-deploying-bm3-trigger'
179 name: 'qtip-daily-dell-us-testing-bm-1-trigger'
184 # name: 'qtip-daily-juniper-pod1-trigger'
186 # - timed : '0 0 * * *'
189 # name: 'qtip-dailty-orange-fr-pod2-trigger'
191 # - timed : ' 0 0 * * *'