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 #--------------------------------
63 #--------------------------------
69 - 'bottlenecks-{installer}-{suite}-{pod}-daily-{stream}'
71 ################################
73 ################################
75 name: 'bottlenecks-{installer}-{suite}-{pod}-daily-{stream}'
81 name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO'
87 - '{installer}-defaults'
88 - 'bottlenecks-params-{pod}'
91 default: "/home/opnfv/bottlenecks"
92 description: "Directory where the repository is cloned"
95 default: 'os-odl_l2-nofeature-ha'
97 name: GERRIT_REFSPEC_DEBUG
99 description: "Gerrit refspec for debug."
103 description: "test suite name."
106 default: '{docker-tag}'
107 description: "docker image tag used for version control"
111 credentials-id: '{ssh-credentials}'
116 - 'bottlenecks-env-cleanup'
117 - 'bottlenecks-run-suite'
121 recipients: hongbo.tianhongbo@huawei.com matthew.lijun@huawei.com liangqi1@huawei.com sunshine.wang@huawei.com
123 ########################
125 ########################
127 name: bottlenecks-env-cleanup
132 [[ $GERRIT_REFSPEC_DEBUG == true ]] && redirect="/dev/stdout" || redirect="/dev/null"
134 echo "Bottlenecks: docker containers/images cleaning up"
135 if [[ ! -z $(docker ps -a | grep opnfv/bottlenecks) ]]; then
136 echo "removing existing opnfv/bottlenecks containers"
137 docker ps -a | grep opnfv/bottlenecks | awk '{print $1}' | xargs docker rm -f >$redirect
140 if [[ ! -z $(docker images | grep opnfv/bottlenecks) ]]; then
141 echo "Bottlenecks: docker images to remove:"
142 docker images | head -1 && docker images | grep opnfv/bottlenecks
143 image_tags=($(docker images | grep opnfv/bottlenecks | awk '{print $2}'))
144 for tag in "${image_tags[@]}"; do
145 echo "Removing docker image opnfv/bottlenecks:$tag..."
146 docker rmi opnfv/bottlenecks:$tag >$redirect
151 name: bottlenecks-run-suite
156 [[ $GERRIT_REFSPEC_DEBUG == true ]] && redirect="/dev/stdout" || redirect="/dev/null"
158 echo "Bottlenecks: to pull image opnfv/bottlenecks:${DOCKER_TAG}"
159 docker pull opnfv/bottlenecks:$DOCKER_TAG >${redirect}
161 echo "Bottlenecks: docker start running"
162 opts="--privileged=true -id"
163 envs="-e INSTALLER_TYPE=${INSTALLER_TYPE} -e INSTALLER_IP=${INSTALLER_IP} \
164 -e NODE_NAME=${NODE_NAME} -e EXTERNAL_NET=${EXTERNAL_NETWORK} \
165 -e BOTTLENECKS_BRANCH=${BOTTLENECKS_BRANCH} -e GERRIT_REFSPEC_DEBUG=${GERRIT_REFSPEC_DEBUG} \
166 -e BOTTLENECKS_DB_TARGET=${BOTTLENECKS_DB_TARGET} -e PACKAGE_URL=${PACKAGE_URL}"
167 cmd="sudo docker run ${opts} ${envs} opnfv/bottlenecks:${DOCKER_TAG} /bin/bash"
168 echo "Bottlenecks: docker cmd running ${cmd}"
171 echo "Bottlenecks: obtain docker id"
172 container_id=$(docker ps | grep "opnfv/bottlenecks:${DOCKER_TAG}" | awk '{print $1}' | head -1)
173 if [ -z ${container_id} ]; then
174 echo "Cannot find opnfv/bottlenecks container ID ${container_id}. Please check if it exists."
179 echo "Bottlenecks: to prepare openstack environment"
180 prepare_env="${REPO_DIR}/ci/prepare_env.sh"
181 echo "Bottlenecks: docker cmd running: ${prepare_env}"
182 sudo docker exec ${container_id} ${prepare_env}
184 echo "Bottlenecks: to run testsuite ${SUITE_NAME}"
185 run_testsuite="${REPO_DIR}/run_tests.sh -s ${SUITE_NAME}"
186 echo "Bottlenecks: docker cmd running: ${run_testsuite}"
187 sudo docker exec ${container_id} ${run_testsuite}
194 name: 'bottlenecks-params-intel-pod5'
197 name: BOTTLENECKS_DB_TARGET
198 default: '213.77.62.197'
199 description: 'Arguments to use in order to choose the backend DB'
202 name: 'bottlenecks-params-intel-pod6'
205 name: BOTTLENECKS_DB_TARGET
206 default: '213.77.62.197'
207 description: 'Arguments to use in order to choose the backend DB'
210 name: 'bottlenecks-params-intel-pod8'
213 name: BOTTLENECKS_DB_TARGET
214 default: '213.77.62.197'
215 description: 'Arguments to use in order to choose the backend DB'
218 name: 'bottlenecks-params-ericsson-pod1'
221 name: BOTTLENECKS_DB_TARGET
222 default: '213.77.62.197'
223 description: 'Arguments to use in order to choose the backend DB'
226 name: 'bottlenecks-params-ericsson-pod2'
229 name: BOTTLENECKS_DB_TARGET
230 default: '213.77.62.197'
231 description: 'Arguments to use in order to choose the backend DB'
234 name: 'bottlenecks-params-opnfv-jump-2'
237 name: BOTTLENECKS_DB_TARGET
238 default: '213.77.62.197'
239 description: 'Arguments to use in order to choose the backend DB'
242 name: 'bottlenecks-params-huawei-us-deploy-bare-1'
245 name: BOTTLENECKS_DB_TARGET
246 default: '213.77.62.197'
247 description: 'Arguments to use in order to choose the backend DB'
250 name: 'bottlenecks-params-zte-build-1'
253 name: BOTTLENECKS_DB_TARGET
254 default: '213.77.62.197'
255 description: 'Arguments to use in order to choose the backend DB'
258 name: 'bottlenecks-params-orange-pod2'
261 name: BOTTLENECKS_DB_TARGET
262 default: '213.77.62.197'
263 description: 'Arguments to use in order to choose the backend DB'