1 ####################################
2 # job configuration for bottlenecks
3 ####################################
5 name: bottlenecks-ci-jobs
9 #--------------------------------
11 #--------------------------------
15 #This is used for common project file storage
17 #This is used for different test suite dependent packages storage
18 gs-packagepath: '/{suite}'
19 #docker tag used for version control
21 brahmaputra: &brahmaputra
23 branch: 'stable/{stream}'
24 gs-pathname: '/{stream}'
25 gs-packagepath: '/{stream}/{suite}'
27 #--------------------------------
28 # POD, INSTALLER, AND BRANCH MAPPING
29 #--------------------------------
31 #--------------------------------
39 - huawei-us-deploy-bare-1:
42 #--------------------------------
44 #--------------------------------
66 #--------------------------------
72 - 'bottlenecks-{installer}-{suite}-{pod}-daily-{stream}'
74 ################################
76 ################################
78 name: 'bottlenecks-{installer}-{suite}-{pod}-daily-{stream}'
84 name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO'
90 - '{installer}-defaults'
91 - 'bottlenecks-params-{pod}'
94 default: "/home/opnfv/bottlenecks"
95 description: "Directory where the repository is cloned"
98 default: 'os-odl_l2-nofeature-ha'
100 name: GERRIT_REFSPEC_DEBUG
102 description: "Gerrit refspec for debug."
106 description: "test suite name."
109 default: '{docker-tag}'
110 description: "docker image tag used for version control"
114 credentials-id: '{ssh-credentials}'
119 - 'bottlenecks-env-cleanup'
120 - 'bottlenecks-run-suite'
124 recipients: hongbo.tianhongbo@huawei.com matthew.lijun@huawei.com liangqi1@huawei.com sunshine.wang@huawei.com
126 ########################
128 ########################
130 name: bottlenecks-env-cleanup
135 [[ $GERRIT_REFSPEC_DEBUG == true ]] && redirect="/dev/stdout" || redirect="/dev/null"
137 echo "Bottlenecks: docker containers/images cleaning up"
138 if [[ ! -z $(docker ps -a | grep opnfv/bottlenecks) ]]; then
139 echo "removing existing opnfv/bottlenecks containers"
140 docker ps -a | grep opnfv/bottlenecks | awk '{print $1}' | xargs docker rm -f >$redirect
143 if [[ ! -z $(docker images | grep opnfv/bottlenecks) ]]; then
144 echo "Bottlenecks: docker images to remove:"
145 docker images | head -1 && docker images | grep opnfv/bottlenecks
146 image_tags=($(docker images | grep opnfv/bottlenecks | awk '{print $2}'))
147 for tag in "${image_tags[@]}"; do
148 echo "Removing docker image opnfv/bottlenecks:$tag..."
149 docker rmi opnfv/bottlenecks:$tag >$redirect
154 name: bottlenecks-run-suite
159 [[ $GERRIT_REFSPEC_DEBUG == true ]] && redirect="/dev/stdout" || redirect="/dev/null"
161 echo "Bottlenecks: to pull image opnfv/bottlenecks:${DOCKER_TAG}"
162 docker pull opnfv/bottlenecks:$DOCKER_TAG >${redirect}
164 echo "Bottlenecks: docker start running"
165 opts="--privileged=true -id"
166 envs="-e INSTALLER_TYPE=${INSTALLER_TYPE} -e INSTALLER_IP=${INSTALLER_IP} \
167 -e NODE_NAME=${NODE_NAME} -e EXTERNAL_NET=${EXTERNAL_NETWORK} \
168 -e BOTTLENECKS_BRANCH=${BOTTLENECKS_BRANCH} -e GERRIT_REFSPEC_DEBUG=${GERRIT_REFSPEC_DEBUG} \
169 -e BOTTLENECKS_DB_TARGET=${BOTTLENECKS_DB_TARGET} -e PACKAGE_URL=${PACKAGE_URL}"
170 cmd="sudo docker run ${opts} ${envs} opnfv/bottlenecks:${DOCKER_TAG} /bin/bash"
171 echo "Bottlenecks: docker cmd running ${cmd}"
174 echo "Bottlenecks: obtain docker id"
175 container_id=$(docker ps | grep "opnfv/bottlenecks:${DOCKER_TAG}" | awk '{print $1}' | head -1)
176 if [ -z ${container_id} ]; then
177 echo "Cannot find opnfv/bottlenecks container ID ${container_id}. Please check if it exists."
182 echo "Bottlenecks: to prepare openstack environment"
183 prepare_env="${REPO_DIR}/ci/prepare_env.sh"
184 echo "Bottlenecks: docker cmd running: ${prepare_env}"
185 sudo docker exec ${container_id} ${prepare_env}
187 echo "Bottlenecks: to run testsuite ${SUITE_NAME}"
188 run_testsuite="${REPO_DIR}/run_tests.sh -s ${SUITE_NAME}"
189 echo "Bottlenecks: docker cmd running: ${run_testsuite}"
190 sudo docker exec ${container_id} ${run_testsuite}
197 name: 'bottlenecks-params-intel-pod5'
200 name: BOTTLENECKS_DB_TARGET
201 default: '213.77.62.197'
202 description: 'Arguments to use in order to choose the backend DB'
205 name: 'bottlenecks-params-intel-pod6'
208 name: BOTTLENECKS_DB_TARGET
209 default: '213.77.62.197'
210 description: 'Arguments to use in order to choose the backend DB'
213 name: 'bottlenecks-params-intel-pod8'
216 name: BOTTLENECKS_DB_TARGET
217 default: '213.77.62.197'
218 description: 'Arguments to use in order to choose the backend DB'
221 name: 'bottlenecks-params-ericsson-pod1'
224 name: BOTTLENECKS_DB_TARGET
225 default: '213.77.62.197'
226 description: 'Arguments to use in order to choose the backend DB'
229 name: 'bottlenecks-params-ericsson-pod2'
232 name: BOTTLENECKS_DB_TARGET
233 default: '213.77.62.197'
234 description: 'Arguments to use in order to choose the backend DB'
237 name: 'bottlenecks-params-opnfv-jump-2'
240 name: BOTTLENECKS_DB_TARGET
241 default: '213.77.62.197'
242 description: 'Arguments to use in order to choose the backend DB'
245 name: 'bottlenecks-params-huawei-us-deploy-bare-1'
248 name: BOTTLENECKS_DB_TARGET
249 default: '213.77.62.197'
250 description: 'Arguments to use in order to choose the backend DB'
253 name: 'bottlenecks-params-zte-pod1'
256 name: BOTTLENECKS_DB_TARGET
257 default: '213.77.62.197'
258 description: 'Arguments to use in order to choose the backend DB'
261 name: 'bottlenecks-params-orange-pod2'
264 name: BOTTLENECKS_DB_TARGET
265 default: '213.77.62.197'
266 description: 'Arguments to use in order to choose the backend DB'