2 - xtesting-pi-containers: &xtesting-pi-containers
3 name: 'xtesting-pi-containers'
6 container: '{container}'
9 - xtesting-pi-params: &xtesting-pi-params
10 name: 'xtesting-pi-params'
55 - xtesting-pi-ollivier-xtesting-params: &xtesting-pi-ollivier-xtesting-params
56 name: 'xtesting-pi-ollivier-xtesting-params'
104 - xtesting-pi-jobs: &xtesting-pi-jobs
105 name: 'xtesting-pi-jobs'
106 current-parameters: true
109 name: xtesting-pi-node
116 name: xtesting-pi-build_tag
121 - xtesting-pi-run-containers: &xtesting-pi-run-containers
122 name: 'xtesting-pi-run-containers'
123 <<: *xtesting-pi-containers
124 privileged: '{privileged}'
130 published_ports: '{published_ports}'
133 name: xtesting-pi-pull-containers
137 if [ "{repo}" = "_" ]; then
138 image={container}:{tag}
139 elif [ "{port}" = "None" ]; then
140 image={repo}/{container}:{tag}
142 image={repo}:{port}/{container}:{tag}
144 sudo docker pull $image
147 name: xtesting-pi-run-containers
152 if [ "{volumes}" != "None" ]; then
153 for i in $(echo {volumes} | tr -d '[]' |sed "s/, / /g" ); \
154 do volumes="-v $i $volumes"; done
157 if [ "{env}" != "None" ]; then
158 for i in $(eval echo {env} | tr -d '[]' |sed "s/, / /g" ); \
159 do env="-e $i $env"; done
162 if [ "{published_ports}" != "None" ]; then
163 for i in $(echo {published_ports} | tr -d '[]' |sed "s/, / /g" ); \
164 do published_ports="-p $i $published_ports"; done
166 [ ! -z "$WORKSPACE" ] && sudo rm -rf $WORKSPACE/results || true
167 if [ "{repo}" = "_" ]; then
168 image={container}:{tag}
169 elif [ "{port}" = "None" ]; then
170 image={repo}/{container}:{tag}
172 image={repo}:{port}/{container}:{tag}
174 sudo mkdir -p $WORKSPACE/results
175 sudo chown {uid}:{gid} $WORKSPACE/results
176 sudo docker run --rm \
177 --privileged={privileged} \
178 --network={network} \
182 -e S3_ENDPOINT_URL=https://storage.googleapis.com \
183 -e S3_DST_URL=s3://artifacts.opnfv.org/xtesting/$BUILD_TAG/$JOB_NAME-$BUILD_ID \
184 -e HTTP_DST_URL=http://artifacts.opnfv.org/xtesting/$BUILD_TAG/$JOB_NAME-$BUILD_ID \
185 -v /home/opnfv/xtesting/.boto:/etc/boto.cfg \
186 -e TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results \
187 -e TEST_DB_EXT_URL=http://testresults.opnfv.org/test/api/v1/results \
189 -e BUILD_TAG=$BUILD_TAG \
190 -v $WORKSPACE/../$JOB_NAME/results:/var/lib/xtesting/results \
191 $image run_tests -t {test} -p -r
194 name: xtesting-pi-remove-images
198 if [ "{repo}" = "_" ]; then
199 image={container}:{tag}
200 elif [ "{port}" = "None" ]; then
201 image={repo}/{container}:{tag}
203 image={repo}:{port}/{container}:{tag}
205 sudo docker rmi $image || true
208 name: 'xtesting-pi-ollivier-xtesting-{tag}-pull'
213 - xtesting-pi-pull-containers:
214 <<: *xtesting-pi-containers
217 name: 'xtesting-pi-ollivier-xtesting-pull'
218 <<: *xtesting-pi-ollivier-xtesting-params
220 - 'xtesting-pi-ollivier-xtesting-{tag}-pull'
223 name: 'xtesting-pi-ollivier-xtesting-{tag}-rmi'
228 - xtesting-pi-remove-images:
229 <<: *xtesting-pi-containers
232 name: 'xtesting-pi-ollivier-xtesting-rmi'
233 <<: *xtesting-pi-ollivier-xtesting-params
235 - 'xtesting-pi-ollivier-xtesting-{tag}-rmi'
238 name: 'xtesting-pi-ollivier-xtesting-{tag}-{test}-run'
242 - xtesting-pi-build_tag:
245 - xtesting-pi-run-containers:
246 <<: *xtesting-pi-run-containers
250 name: 'xtesting-pi-ollivier-xtesting'
251 <<: *xtesting-pi-ollivier-xtesting-params
255 container: 'xtesting'
275 - 'xtesting-pi-ollivier-xtesting-{tag}-{test}-run'
278 name: xtesting-pi-zip
283 if [ "{volumes}" != "None" ]; then
284 for i in $(echo {volumes} | tr -d '[]' |sed "s/, / /g" ); \
285 do volumes="-v $i $volumes"; done
288 if [ "{env}" != "None" ]; then
289 for i in $(eval echo {env} | tr -d '[]' |sed "s/, / /g" ); \
290 do env="-e $i $env"; done
293 if [ "{published_ports}" != "None" ]; then
294 for i in $(echo {published_ports} | tr -d '[]' |sed "s/, / /g" ); \
295 do published_ports="-p $i $published_ports"; done
297 [ ! -z "$WORKSPACE" ] && sudo rm -rf $WORKSPACE/results || true
298 if [ "{repo}" = "_" ]; then
299 image={container}:{tag}
300 elif [ "{port}" = "None" ]; then
301 image={repo}/{container}:{tag}
303 image={repo}:{port}/{container}:{tag}
305 sudo mkdir -p $WORKSPACE/results
306 sudo chown {uid}:{gid} $WORKSPACE/results
307 sudo docker run --rm \
308 --privileged={privileged} \
309 --network={network} \
313 -e S3_ENDPOINT_URL=https://storage.googleapis.com \
314 -e S3_DST_URL=s3://artifacts.opnfv.org/xtesting \
315 -e HTTP_DST_URL=http://artifacts.opnfv.org/xtesting \
316 -v /home/opnfv/xtesting/.boto:/etc/boto.cfg \
317 -e TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results \
318 -e TEST_DB_EXT_URL=http://testresults.opnfv.org/test/api/v1/results \
320 -e BUILD_TAG=$BUILD_TAG \
321 -v $WORKSPACE/../$JOB_NAME/results:/var/lib/xtesting/results \
325 name: 'xtesting-pi-{tag}-zip'
329 - xtesting-pi-build_tag:
333 <<: *xtesting-pi-run-containers
336 name: 'xtesting-pi-zip'
337 <<: *xtesting-pi-ollivier-xtesting-params
341 container: 'xtesting'
347 - 'xtesting-pi-{tag}-zip'
350 name: 'xtesting-pi-{tag}-daily'
351 project-type: multijob
357 - xtesting-pi-build_tag:
359 # PyYAML and yamllint differ here
360 # see https://github.com/yaml/pyyaml/issues/234
361 # yamllint disable rule:indentation
365 - ^xtesting-(pi-)*{tag}-(daily|docker|review)$
366 # yamllint enable rule:indentation
369 name: remove former images
371 - name: 'xtesting-pi-ollivier-xtesting-{tag}-rmi'
372 <<: *xtesting-pi-jobs
374 name: pull containers
376 - name: 'xtesting-pi-ollivier-xtesting-{tag}-pull'
377 <<: *xtesting-pi-jobs
379 name: ollivier/xtesting:{tag}
381 - name: 'xtesting-pi-ollivier-xtesting-{tag}-first-run'
382 <<: *xtesting-pi-jobs
383 - name: 'xtesting-pi-ollivier-xtesting-{tag}-second-run'
384 <<: *xtesting-pi-jobs
385 - name: 'xtesting-pi-ollivier-xtesting-{tag}-third-run'
386 <<: *xtesting-pi-jobs
387 - name: 'xtesting-pi-ollivier-xtesting-{tag}-fourth-run'
388 <<: *xtesting-pi-jobs
389 - name: 'xtesting-pi-ollivier-xtesting-{tag}-fifth-run'
390 <<: *xtesting-pi-jobs
391 - name: 'xtesting-pi-ollivier-xtesting-{tag}-sixth-run'
392 <<: *xtesting-pi-jobs
393 - name: 'xtesting-pi-ollivier-xtesting-{tag}-eighth-run'
394 <<: *xtesting-pi-jobs
395 - name: 'xtesting-pi-ollivier-xtesting-{tag}-nineth-run'
396 <<: *xtesting-pi-jobs
398 name: dump all campaign data
400 - name: 'xtesting-pi-{tag}-zip'
401 <<: *xtesting-pi-jobs
407 recipients: cedric.ollivier@orange.com
410 name: 'xtesting-pi-daily'
411 <<: *xtesting-pi-params
413 - 'xtesting-pi-{tag}-daily'
425 regex: ^xtesting-pi-[a-z-0-9.]+-daily$