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'
51 - xtesting-pi-jobs: &xtesting-pi-jobs
52 name: 'xtesting-pi-jobs'
53 current-parameters: true
56 name: xtesting-pi-slave
63 name: xtesting-pi-build_tag
68 - xtesting-pi-run-containers: &xtesting-pi-run-containers
69 name: 'xtesting-pi-run-containers'
70 <<: *xtesting-pi-containers
72 privileged: '{privileged}'
78 published_ports: '{published_ports}'
81 name: xtesting-pi-pull-containers
85 if [ "{repo}" = "_" ]; then
86 image={container}:{tag}
87 elif [ "{port}" = "None" ]; then
88 image={repo}/{container}:{tag}
90 image={repo}:{port}/{container}:{tag}
92 sudo docker pull $image
95 name: xtesting-pi-run-containers
100 if [ "{volumes}" != "None" ]; then
101 for i in $(echo {volumes} | tr -d '[]' |sed "s/, / /g" ); \
102 do volumes="-v $i $volumes"; done
105 if [ "{env}" != "None" ]; then
106 for i in $(eval echo {env} | tr -d '[]' |sed "s/, / /g" ); \
107 do env="-e $i $env"; done
110 if [ "{published_ports}" != "None" ]; then
111 for i in $(echo {published_ports} | tr -d '[]' |sed "s/, / /g" ); \
112 do published_ports="-p $i $published_ports"; done
114 [ ! -z "$WORKSPACE" ] && sudo rm -rf $WORKSPACE/results || true
115 if [ "{repo}" = "_" ]; then
116 image={container}:{tag}
117 elif [ "{port}" = "None" ]; then
118 image={repo}/{container}:{tag}
120 image={repo}:{port}/{container}:{tag}
122 sudo mkdir -p $WORKSPACE/results
123 sudo chown {uid}:{gid} $WORKSPACE/results
124 sudo docker run --rm \
125 --privileged={privileged} \
126 --network={network} \
130 -e S3_ENDPOINT_URL=https://storage.googleapis.com \
131 -e S3_DST_URL=s3://artifacts.opnfv.org/xtesting/$BUILD_TAG/$JOB_NAME-$BUILD_ID \
132 -e HTTP_DST_URL=http://artifacts.opnfv.org/xtesting/$BUILD_TAG/$JOB_NAME-$BUILD_ID \
133 -v /home/opnfv/xtesting/.boto:/etc/boto.cfg \
134 -e TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results \
135 -e TEST_DB_EXT_URL=http://testresults.opnfv.org/test/api/v1/results \
136 -e NODE_NAME=$slave \
137 -e BUILD_TAG=$BUILD_TAG \
138 -v $WORKSPACE/../$JOB_NAME/results:/var/lib/xtesting/results \
139 $image run_tests -t {test} -p -r
142 name: xtesting-pi-remove-images
146 if [ "{repo}" = "_" ]; then
147 image={container}:{tag}
148 elif [ "{port}" = "None" ]; then
149 image={repo}/{container}:{tag}
151 image={repo}:{port}/{container}:{tag}
153 sudo docker rmi $image || true
156 name: 'xtesting-pi-{repo}-{container}-{tag}-pull'
161 - xtesting-pi-pull-containers:
162 <<: *xtesting-pi-containers
165 name: 'xtesting-pi-ollivier-xtesting-pull'
166 <<: *xtesting-pi-params
167 container: 'xtesting'
169 - 'xtesting-pi-{repo}-{container}-{tag}-pull'
172 name: 'xtesting-pi-ollivier-xtesting-mts-pull'
173 <<: *xtesting-pi-params
174 container: 'xtesting-mts'
176 - 'xtesting-pi-{repo}-{container}-{tag}-pull'
179 name: 'xtesting-pi-{repo}-{container}-{tag}-rmi'
184 - xtesting-pi-remove-images:
185 <<: *xtesting-pi-containers
188 name: 'xtesting-pi-ollivier-xtesting-rmi'
189 <<: *xtesting-pi-params
190 container: 'xtesting'
192 - 'xtesting-pi-{repo}-{container}-{tag}-rmi'
195 name: 'xtesting-pi-ollivier-xtesting-mts-rmi'
196 <<: *xtesting-pi-params
197 container: 'xtesting-mts'
199 - 'xtesting-pi-{repo}-{container}-{tag}-rmi'
202 name: 'xtesting-pi-ollivier-xtesting-{tag}-{test}-run'
206 - xtesting-pi-build_tag:
209 - xtesting-pi-run-containers:
210 <<: *xtesting-pi-run-containers
213 name: 'xtesting-pi-ollivier-xtesting'
214 <<: *xtesting-pi-params
218 container: 'xtesting'
251 - 'xtesting-pi-ollivier-xtesting-{tag}-{test}-run'
254 name: 'xtesting-pi-ollivier-xtesting-mts-{tag}-{test}-run'
258 - xtesting-pi-build_tag:
261 - xtesting-pi-run-containers:
262 <<: *xtesting-pi-run-containers
265 name: 'xtesting-pi-ollivier-xtesting-mts'
266 <<: *xtesting-pi-params
270 container: 'xtesting-mts'
278 - 'xtesting-pi-ollivier-xtesting-mts-{tag}-{test}-run'
281 name: xtesting-pi-zip
286 if [ "{volumes}" != "None" ]; then
287 for i in $(echo {volumes} | tr -d '[]' |sed "s/, / /g" ); \
288 do volumes="-v $i $volumes"; done
291 if [ "{env}" != "None" ]; then
292 for i in $(eval echo {env} | tr -d '[]' |sed "s/, / /g" ); \
293 do env="-e $i $env"; done
296 if [ "{published_ports}" != "None" ]; then
297 for i in $(echo {published_ports} | tr -d '[]' |sed "s/, / /g" ); \
298 do published_ports="-p $i $published_ports"; done
300 [ ! -z "$WORKSPACE" ] && sudo rm -rf $WORKSPACE/results || true
301 if [ "{repo}" = "_" ]; then
302 image={container}:{tag}
303 elif [ "{port}" = "None" ]; then
304 image={repo}/{container}:{tag}
306 image={repo}:{port}/{container}:{tag}
308 sudo mkdir -p $WORKSPACE/results
309 sudo chown {uid}:{gid} $WORKSPACE/results
310 sudo docker run --rm \
314 -e S3_ENDPOINT_URL=https://storage.googleapis.com \
315 -e S3_DST_URL=s3://artifacts.opnfv.org/xtesting \
316 -e HTTP_DST_URL=http://artifacts.opnfv.org/xtesting \
317 -v /home/opnfv/xtesting/.boto:/etc/boto.cfg \
318 -e TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results \
319 -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-containers
338 published_ports: '{published_ports}'
341 name: 'xtesting-pi-{tag}-zip'
342 <<: *xtesting-pi-params
346 container: 'xtesting'
350 - 'xtesting-pi-{tag}-zip'
353 name: 'xtesting-pi-{tag}-daily'
354 project-type: multijob
360 - xtesting-pi-build_tag:
362 # PyYAML and yamllint differ here
363 # see https://github.com/yaml/pyyaml/issues/234
364 # yamllint disable rule:indentation
368 - ^xtesting-(pi-)*{tag}-(daily|docker|review)$
369 # yamllint enable rule:indentation
372 name: remove former images
374 - name: 'xtesting-pi-ollivier-xtesting-{tag}-rmi'
375 <<: *xtesting-pi-jobs
376 - name: 'xtesting-pi-ollivier-xtesting-mts-{tag}-rmi'
377 <<: *xtesting-pi-jobs
379 name: pull containers
381 - name: 'xtesting-pi-ollivier-xtesting-{tag}-pull'
382 <<: *xtesting-pi-jobs
383 - name: 'xtesting-pi-ollivier-xtesting-mts-{tag}-pull'
384 <<: *xtesting-pi-jobs
386 name: ollivier/xtesting:{tag}
388 - name: 'xtesting-pi-ollivier-xtesting-{tag}-first-run'
389 <<: *xtesting-pi-jobs
390 - name: 'xtesting-pi-ollivier-xtesting-{tag}-second-run'
391 <<: *xtesting-pi-jobs
392 - name: 'xtesting-pi-ollivier-xtesting-{tag}-third-run'
393 <<: *xtesting-pi-jobs
394 - name: 'xtesting-pi-ollivier-xtesting-{tag}-fourth-run'
395 <<: *xtesting-pi-jobs
396 - name: 'xtesting-pi-ollivier-xtesting-{tag}-fifth-run'
397 <<: *xtesting-pi-jobs
398 - name: 'xtesting-pi-ollivier-xtesting-{tag}-sixth-run'
399 <<: *xtesting-pi-jobs
400 - name: 'xtesting-pi-ollivier-xtesting-{tag}-eighth-run'
401 <<: *xtesting-pi-jobs
403 name: ollivier/xtesting-mts:{tag}
405 - name: 'xtesting-pi-ollivier-xtesting-mts-{tag}-seventh-run'
406 <<: *xtesting-pi-jobs
408 name: dump all campaign data
410 - name: 'xtesting-pi-{tag}-zip'
411 <<: *xtesting-pi-jobs
417 recipients: cedric.ollivier@orange.com
420 name: 'xtesting-pi-daily'
421 <<: *xtesting-pi-params
423 - 'xtesting-pi-{tag}-daily'
435 regex: ^xtesting-pi-[a-z-0-9.]+-daily$