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'
57 - xtesting-pi-jobs: &xtesting-pi-jobs
58 name: 'xtesting-pi-jobs'
59 current-parameters: true
62 name: xtesting-pi-slave
69 name: xtesting-pi-build_tag
74 - xtesting-pi-run-containers: &xtesting-pi-run-containers
75 name: 'xtesting-pi-run-containers'
76 <<: *xtesting-pi-containers
78 privileged: '{privileged}'
84 published_ports: '{published_ports}'
87 name: xtesting-pi-pull-containers
91 if [ "{repo}" = "_" ]; then
92 image={container}:{tag}
93 elif [ "{port}" = "None" ]; then
94 image={repo}/{container}:{tag}
96 image={repo}:{port}/{container}:{tag}
98 sudo docker pull $image
101 name: xtesting-pi-run-containers
106 if [ "{volumes}" != "None" ]; then
107 for i in $(echo {volumes} | tr -d '[]' |sed "s/, / /g" ); \
108 do volumes="-v $i $volumes"; done
111 if [ "{env}" != "None" ]; then
112 for i in $(eval echo {env} | tr -d '[]' |sed "s/, / /g" ); \
113 do env="-e $i $env"; done
116 if [ "{published_ports}" != "None" ]; then
117 for i in $(echo {published_ports} | tr -d '[]' |sed "s/, / /g" ); \
118 do published_ports="-p $i $published_ports"; done
120 [ ! -z "$WORKSPACE" ] && sudo rm -rf $WORKSPACE/results || true
121 if [ "{repo}" = "_" ]; then
122 image={container}:{tag}
123 elif [ "{port}" = "None" ]; then
124 image={repo}/{container}:{tag}
126 image={repo}:{port}/{container}:{tag}
128 sudo mkdir -p $WORKSPACE/results
129 sudo chown {uid}:{gid} $WORKSPACE/results
130 sudo docker run --rm \
131 --privileged={privileged} \
132 --network={network} \
136 -e S3_ENDPOINT_URL=https://storage.googleapis.com \
137 -e S3_DST_URL=s3://artifacts.opnfv.org/xtesting/$BUILD_TAG/$JOB_NAME-$BUILD_ID \
138 -e HTTP_DST_URL=http://artifacts.opnfv.org/xtesting/$BUILD_TAG/$JOB_NAME-$BUILD_ID \
139 -v /home/opnfv/xtesting/.boto:/etc/boto.cfg \
140 -e TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results \
141 -e TEST_DB_EXT_URL=http://testresults.opnfv.org/test/api/v1/results \
142 -e NODE_NAME=$slave \
143 -e BUILD_TAG=$BUILD_TAG \
144 -v $WORKSPACE/../$JOB_NAME/results:/var/lib/xtesting/results \
145 $image run_tests -t {test} -p -r
148 name: xtesting-pi-remove-images
152 if [ "{repo}" = "_" ]; then
153 image={container}:{tag}
154 elif [ "{port}" = "None" ]; then
155 image={repo}/{container}:{tag}
157 image={repo}:{port}/{container}:{tag}
159 sudo docker rmi $image || true
162 name: 'xtesting-pi-{repo}-{container}-{tag}-pull'
167 - xtesting-pi-pull-containers:
168 <<: *xtesting-pi-containers
171 name: 'xtesting-pi-ollivier-xtesting-pull'
172 <<: *xtesting-pi-params
173 container: 'xtesting'
175 - 'xtesting-pi-{repo}-{container}-{tag}-pull'
178 name: 'xtesting-pi-ollivier-xtesting-mts-pull'
179 <<: *xtesting-pi-params
180 container: 'xtesting-mts'
182 - 'xtesting-pi-{repo}-{container}-{tag}-pull'
185 name: 'xtesting-pi-{repo}-{container}-{tag}-rmi'
190 - xtesting-pi-remove-images:
191 <<: *xtesting-pi-containers
194 name: 'xtesting-pi-ollivier-xtesting-rmi'
195 <<: *xtesting-pi-params
196 container: 'xtesting'
198 - 'xtesting-pi-{repo}-{container}-{tag}-rmi'
201 name: 'xtesting-pi-ollivier-xtesting-mts-rmi'
202 <<: *xtesting-pi-params
203 container: 'xtesting-mts'
205 - 'xtesting-pi-{repo}-{container}-{tag}-rmi'
208 name: 'xtesting-pi-ollivier-xtesting-{tag}-{test}-run'
212 - xtesting-pi-build_tag:
215 - xtesting-pi-run-containers:
216 <<: *xtesting-pi-run-containers
219 name: 'xtesting-pi-ollivier-xtesting'
220 <<: *xtesting-pi-params
224 container: 'xtesting'
257 - 'xtesting-pi-ollivier-xtesting-{tag}-{test}-run'
260 name: 'xtesting-pi-ollivier-xtesting-mts-{tag}-{test}-run'
264 - xtesting-pi-build_tag:
267 - xtesting-pi-run-containers:
268 <<: *xtesting-pi-run-containers
271 name: 'xtesting-pi-ollivier-xtesting-mts'
272 <<: *xtesting-pi-params
276 container: 'xtesting-mts'
284 - 'xtesting-pi-ollivier-xtesting-mts-{tag}-{test}-run'
287 name: xtesting-pi-zip
292 if [ "{volumes}" != "None" ]; then
293 for i in $(echo {volumes} | tr -d '[]' |sed "s/, / /g" ); \
294 do volumes="-v $i $volumes"; done
297 if [ "{env}" != "None" ]; then
298 for i in $(eval echo {env} | tr -d '[]' |sed "s/, / /g" ); \
299 do env="-e $i $env"; done
302 if [ "{published_ports}" != "None" ]; then
303 for i in $(echo {published_ports} | tr -d '[]' |sed "s/, / /g" ); \
304 do published_ports="-p $i $published_ports"; done
306 [ ! -z "$WORKSPACE" ] && sudo rm -rf $WORKSPACE/results || true
307 if [ "{repo}" = "_" ]; then
308 image={container}:{tag}
309 elif [ "{port}" = "None" ]; then
310 image={repo}/{container}:{tag}
312 image={repo}:{port}/{container}:{tag}
314 sudo mkdir -p $WORKSPACE/results
315 sudo chown {uid}:{gid} $WORKSPACE/results
316 sudo docker run --rm \
320 -e S3_ENDPOINT_URL=https://storage.googleapis.com \
321 -e S3_DST_URL=s3://artifacts.opnfv.org/xtesting \
322 -e HTTP_DST_URL=http://artifacts.opnfv.org/xtesting \
323 -v /home/opnfv/xtesting/.boto:/etc/boto.cfg \
324 -e TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results \
325 -e TEST_DB_EXT_URL=http://testresults.opnfv.org/test/api/v1/results \
326 -e BUILD_TAG=$BUILD_TAG \
327 -v $WORKSPACE/../$JOB_NAME/results:/var/lib/xtesting/results \
331 name: 'xtesting-pi-{tag}-zip'
335 - xtesting-pi-build_tag:
339 <<: *xtesting-pi-containers
344 published_ports: '{published_ports}'
347 name: 'xtesting-pi-{tag}-zip'
348 <<: *xtesting-pi-params
352 container: 'xtesting'
356 - 'xtesting-pi-{tag}-zip'
359 name: 'xtesting-pi-{tag}-daily'
360 project-type: multijob
366 - xtesting-pi-build_tag:
368 # PyYAML and yamllint differ here
369 # see https://github.com/yaml/pyyaml/issues/234
370 # yamllint disable rule:indentation
374 - ^xtesting-(pi-)*{tag}-(daily|docker|review)$
375 # yamllint enable rule:indentation
378 name: remove former images
380 - name: 'xtesting-pi-ollivier-xtesting-{tag}-rmi'
381 <<: *xtesting-pi-jobs
382 - name: 'xtesting-pi-ollivier-xtesting-mts-{tag}-rmi'
383 <<: *xtesting-pi-jobs
385 name: pull containers
387 - name: 'xtesting-pi-ollivier-xtesting-{tag}-pull'
388 <<: *xtesting-pi-jobs
389 - name: 'xtesting-pi-ollivier-xtesting-mts-{tag}-pull'
390 <<: *xtesting-pi-jobs
392 name: ollivier/xtesting:{tag}
394 - name: 'xtesting-pi-ollivier-xtesting-{tag}-first-run'
395 <<: *xtesting-pi-jobs
396 - name: 'xtesting-pi-ollivier-xtesting-{tag}-second-run'
397 <<: *xtesting-pi-jobs
398 - name: 'xtesting-pi-ollivier-xtesting-{tag}-third-run'
399 <<: *xtesting-pi-jobs
400 - name: 'xtesting-pi-ollivier-xtesting-{tag}-fourth-run'
401 <<: *xtesting-pi-jobs
402 - name: 'xtesting-pi-ollivier-xtesting-{tag}-fifth-run'
403 <<: *xtesting-pi-jobs
404 - name: 'xtesting-pi-ollivier-xtesting-{tag}-sixth-run'
405 <<: *xtesting-pi-jobs
406 - name: 'xtesting-pi-ollivier-xtesting-{tag}-eighth-run'
407 <<: *xtesting-pi-jobs
409 name: ollivier/xtesting-mts:{tag}
411 - name: 'xtesting-pi-ollivier-xtesting-mts-{tag}-seventh-run'
412 <<: *xtesting-pi-jobs
414 name: dump all campaign data
416 - name: 'xtesting-pi-{tag}-zip'
417 <<: *xtesting-pi-jobs
423 recipients: cedric.ollivier@orange.com
426 name: 'xtesting-pi-daily'
427 <<: *xtesting-pi-params
429 - 'xtesting-pi-{tag}-daily'
441 regex: ^xtesting-pi-[a-z-0-9.]+-daily$