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'
45 - xtesting-pi-jobs: &xtesting-pi-jobs
46 name: 'xtesting-pi-jobs'
47 current-parameters: true
50 name: xtesting-pi-slave
57 name: xtesting-pi-build_tag
62 - xtesting-pi-run-containers: &xtesting-pi-run-containers
63 name: 'xtesting-pi-run-containers'
64 <<: *xtesting-pi-containers
66 privileged: '{privileged}'
72 published_ports: '{published_ports}'
75 name: xtesting-pi-pull-containers
79 if [ "{repo}" = "_" ]; then
80 image={container}:{tag}
81 elif [ "{port}" = "None" ]; then
82 image={repo}/{container}:{tag}
84 image={repo}:{port}/{container}:{tag}
86 sudo docker pull $image
89 name: xtesting-pi-run-containers
94 if [ "{volumes}" != "None" ]; then
95 for i in $(echo {volumes} | tr -d '[]' |sed "s/, / /g" ); \
96 do volumes="-v $i $volumes"; done
99 if [ "{env}" != "None" ]; then
100 for i in $(eval echo {env} | tr -d '[]' |sed "s/, / /g" ); \
101 do env="-e $i $env"; done
104 if [ "{published_ports}" != "None" ]; then
105 for i in $(echo {published_ports} | tr -d '[]' |sed "s/, / /g" ); \
106 do published_ports="-p $i $published_ports"; done
108 [ ! -z "$WORKSPACE" ] && sudo rm -rf $WORKSPACE/results || true
109 if [ "{repo}" = "_" ]; then
110 image={container}:{tag}
111 elif [ "{port}" = "None" ]; then
112 image={repo}/{container}:{tag}
114 image={repo}:{port}/{container}:{tag}
116 sudo mkdir -p $WORKSPACE/results
117 sudo chown {uid}:{gid} $WORKSPACE/results
118 sudo docker run --rm \
119 --privileged={privileged} \
120 --network={network} \
124 -e S3_ENDPOINT_URL=https://storage.googleapis.com \
125 -e S3_DST_URL=s3://artifacts.opnfv.org/xtesting/$BUILD_TAG/$JOB_NAME-$BUILD_ID \
126 -e HTTP_DST_URL=http://artifacts.opnfv.org/xtesting/$BUILD_TAG/$JOB_NAME-$BUILD_ID \
127 -v /home/opnfv/xtesting/.boto:/etc/boto.cfg \
128 -e TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results \
129 -e TEST_DB_EXT_URL=http://testresults.opnfv.org/test/api/v1/results \
130 -e NODE_NAME=$slave \
131 -e BUILD_TAG=$BUILD_TAG \
132 -v $WORKSPACE/../$JOB_NAME/results:/var/lib/xtesting/results \
133 $image run_tests -t {test} -p -r
136 name: xtesting-pi-remove-images
140 if [ "{repo}" = "_" ]; then
141 image={container}:{tag}
142 elif [ "{port}" = "None" ]; then
143 image={repo}/{container}:{tag}
145 image={repo}:{port}/{container}:{tag}
147 sudo docker rmi $image || true
150 name: 'xtesting-pi-{repo}-{container}-{tag}-pull'
155 - xtesting-pi-pull-containers:
156 <<: *xtesting-pi-containers
159 name: 'xtesting-pi-ollivier-xtesting-pull'
160 <<: *xtesting-pi-params
161 container: 'xtesting'
163 - 'xtesting-pi-{repo}-{container}-{tag}-pull'
166 name: 'xtesting-pi-ollivier-xtesting-mts-pull'
167 <<: *xtesting-pi-params
168 container: 'xtesting-mts'
170 - 'xtesting-pi-{repo}-{container}-{tag}-pull'
173 name: 'xtesting-pi-{repo}-{container}-{tag}-rmi'
178 - xtesting-pi-remove-images:
179 <<: *xtesting-pi-containers
182 name: 'xtesting-pi-ollivier-xtesting-rmi'
183 <<: *xtesting-pi-params
184 container: 'xtesting'
186 - 'xtesting-pi-{repo}-{container}-{tag}-rmi'
189 name: 'xtesting-pi-ollivier-xtesting-mts-rmi'
190 <<: *xtesting-pi-params
191 container: 'xtesting-mts'
193 - 'xtesting-pi-{repo}-{container}-{tag}-rmi'
196 name: 'xtesting-pi-ollivier-xtesting-{tag}-{test}-run'
200 - xtesting-pi-build_tag:
203 - xtesting-pi-run-containers:
204 <<: *xtesting-pi-run-containers
207 name: 'xtesting-pi-ollivier-xtesting'
208 <<: *xtesting-pi-params
212 container: 'xtesting'
226 - 'xtesting-pi-ollivier-xtesting-{tag}-{test}-run'
229 name: 'xtesting-pi-ollivier-xtesting-mts-{tag}-{test}-run'
233 - xtesting-pi-build_tag:
236 - xtesting-pi-run-containers:
237 <<: *xtesting-pi-run-containers
240 name: 'xtesting-pi-ollivier-xtesting-mts'
241 <<: *xtesting-pi-params
245 container: 'xtesting-mts'
253 - 'xtesting-pi-ollivier-xtesting-mts-{tag}-{test}-run'
256 name: xtesting-pi-zip
261 if [ "{volumes}" != "None" ]; then
262 for i in $(echo {volumes} | tr -d '[]' |sed "s/, / /g" ); \
263 do volumes="-v $i $volumes"; done
266 if [ "{env}" != "None" ]; then
267 for i in $(eval echo {env} | tr -d '[]' |sed "s/, / /g" ); \
268 do env="-e $i $env"; done
271 if [ "{published_ports}" != "None" ]; then
272 for i in $(echo {published_ports} | tr -d '[]' |sed "s/, / /g" ); \
273 do published_ports="-p $i $published_ports"; done
275 [ ! -z "$WORKSPACE" ] && sudo rm -rf $WORKSPACE/results || true
276 if [ "{repo}" = "_" ]; then
277 image={container}:{tag}
278 elif [ "{port}" = "None" ]; then
279 image={repo}/{container}:{tag}
281 image={repo}:{port}/{container}:{tag}
283 sudo mkdir -p $WORKSPACE/results
284 sudo chown {uid}:{gid} $WORKSPACE/results
285 sudo docker run --rm \
289 -e S3_ENDPOINT_URL=https://storage.googleapis.com \
290 -e S3_DST_URL=s3://artifacts.opnfv.org/xtesting \
291 -e HTTP_DST_URL=http://artifacts.opnfv.org/xtesting \
292 -v /home/opnfv/xtesting/.boto:/etc/boto.cfg \
293 -e TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results \
294 -e TEST_DB_EXT_URL=http://testresults.opnfv.org/test/api/v1/results \
295 -e BUILD_TAG=$BUILD_TAG \
296 -v $WORKSPACE/../$JOB_NAME/results:/var/lib/xtesting/results \
300 name: 'xtesting-pi-{tag}-zip'
304 - xtesting-pi-build_tag:
308 <<: *xtesting-pi-containers
313 published_ports: '{published_ports}'
316 name: 'xtesting-pi-{tag}-zip'
317 <<: *xtesting-pi-params
321 container: 'xtesting'
325 - 'xtesting-pi-{tag}-zip'
328 name: 'xtesting-pi-{tag}-daily'
329 project-type: multijob
335 - xtesting-pi-build_tag:
337 # PyYAML and yamllint differ here
338 # see https://github.com/yaml/pyyaml/issues/234
339 # yamllint disable rule:indentation
343 - ^xtesting-(pi-)*{tag}-(daily|docker|review)$
344 # yamllint enable rule:indentation
347 name: remove former images
349 - name: 'xtesting-pi-ollivier-xtesting-{tag}-rmi'
350 <<: *xtesting-pi-jobs
351 - name: 'xtesting-pi-ollivier-xtesting-mts-{tag}-rmi'
352 <<: *xtesting-pi-jobs
354 name: pull containers
356 - name: 'xtesting-pi-ollivier-xtesting-{tag}-pull'
357 <<: *xtesting-pi-jobs
358 - name: 'xtesting-pi-ollivier-xtesting-mts-{tag}-pull'
359 <<: *xtesting-pi-jobs
361 name: ollivier/xtesting:{tag}
363 - name: 'xtesting-pi-ollivier-xtesting-{tag}-first-run'
364 <<: *xtesting-pi-jobs
365 - name: 'xtesting-pi-ollivier-xtesting-{tag}-second-run'
366 <<: *xtesting-pi-jobs
367 - name: 'xtesting-pi-ollivier-xtesting-{tag}-third-run'
368 <<: *xtesting-pi-jobs
369 - name: 'xtesting-pi-ollivier-xtesting-{tag}-fourth-run'
370 <<: *xtesting-pi-jobs
371 - name: 'xtesting-pi-ollivier-xtesting-{tag}-fifth-run'
372 <<: *xtesting-pi-jobs
373 - name: 'xtesting-pi-ollivier-xtesting-{tag}-sixth-run'
374 <<: *xtesting-pi-jobs
375 - name: 'xtesting-pi-ollivier-xtesting-{tag}-eighth-run'
376 <<: *xtesting-pi-jobs
378 name: ollivier/xtesting-mts:{tag}
380 - name: 'xtesting-pi-ollivier-xtesting-mts-{tag}-seventh-run'
381 <<: *xtesting-pi-jobs
383 name: dump all campaign data
385 - name: 'xtesting-pi-{tag}-zip'
386 <<: *xtesting-pi-jobs
392 recipients: cedric.ollivier@orange.com
395 name: 'xtesting-pi-daily'
396 <<: *xtesting-pi-params
398 - 'xtesting-pi-{tag}-daily'
410 regex: ^xtesting-pi-[a-z-0-9.]+-daily$