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'
63 - xtesting-pi-jobs: &xtesting-pi-jobs
64 name: 'xtesting-pi-jobs'
65 current-parameters: true
68 name: xtesting-pi-slave
75 name: xtesting-pi-build_tag
80 - xtesting-pi-run-containers: &xtesting-pi-run-containers
81 name: 'xtesting-pi-run-containers'
82 <<: *xtesting-pi-containers
84 privileged: '{privileged}'
90 published_ports: '{published_ports}'
93 name: xtesting-pi-pull-containers
97 if [ "{repo}" = "_" ]; then
98 image={container}:{tag}
99 elif [ "{port}" = "None" ]; then
100 image={repo}/{container}:{tag}
102 image={repo}:{port}/{container}:{tag}
104 sudo docker pull $image
107 name: xtesting-pi-run-containers
112 if [ "{volumes}" != "None" ]; then
113 for i in $(echo {volumes} | tr -d '[]' |sed "s/, / /g" ); \
114 do volumes="-v $i $volumes"; done
117 if [ "{env}" != "None" ]; then
118 for i in $(eval echo {env} | tr -d '[]' |sed "s/, / /g" ); \
119 do env="-e $i $env"; done
122 if [ "{published_ports}" != "None" ]; then
123 for i in $(echo {published_ports} | tr -d '[]' |sed "s/, / /g" ); \
124 do published_ports="-p $i $published_ports"; done
126 [ ! -z "$WORKSPACE" ] && sudo rm -rf $WORKSPACE/results || true
127 if [ "{repo}" = "_" ]; then
128 image={container}:{tag}
129 elif [ "{port}" = "None" ]; then
130 image={repo}/{container}:{tag}
132 image={repo}:{port}/{container}:{tag}
134 sudo mkdir -p $WORKSPACE/results
135 sudo chown {uid}:{gid} $WORKSPACE/results
136 sudo docker run --rm \
137 --privileged={privileged} \
138 --network={network} \
142 -e S3_ENDPOINT_URL=https://storage.googleapis.com \
143 -e S3_DST_URL=s3://artifacts.opnfv.org/xtesting/$BUILD_TAG/$JOB_NAME-$BUILD_ID \
144 -e HTTP_DST_URL=http://artifacts.opnfv.org/xtesting/$BUILD_TAG/$JOB_NAME-$BUILD_ID \
145 -v /home/opnfv/xtesting/.boto:/etc/boto.cfg \
146 -e TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results \
147 -e TEST_DB_EXT_URL=http://testresults.opnfv.org/test/api/v1/results \
148 -e NODE_NAME=$slave \
149 -e BUILD_TAG=$BUILD_TAG \
150 -v $WORKSPACE/../$JOB_NAME/results:/var/lib/xtesting/results \
151 $image run_tests -t {test} -p -r
154 name: xtesting-pi-remove-images
158 if [ "{repo}" = "_" ]; then
159 image={container}:{tag}
160 elif [ "{port}" = "None" ]; then
161 image={repo}/{container}:{tag}
163 image={repo}:{port}/{container}:{tag}
165 sudo docker rmi $image || true
168 name: 'xtesting-pi-{repo}-{container}-{tag}-pull'
173 - xtesting-pi-pull-containers:
174 <<: *xtesting-pi-containers
177 name: 'xtesting-pi-ollivier-xtesting-pull'
178 <<: *xtesting-pi-params
179 container: 'xtesting'
181 - 'xtesting-pi-{repo}-{container}-{tag}-pull'
184 name: 'xtesting-pi-ollivier-xtesting-mts-pull'
185 <<: *xtesting-pi-params
186 container: 'xtesting-mts'
188 - 'xtesting-pi-{repo}-{container}-{tag}-pull'
191 name: 'xtesting-pi-{repo}-{container}-{tag}-rmi'
196 - xtesting-pi-remove-images:
197 <<: *xtesting-pi-containers
200 name: 'xtesting-pi-ollivier-xtesting-rmi'
201 <<: *xtesting-pi-params
202 container: 'xtesting'
204 - 'xtesting-pi-{repo}-{container}-{tag}-rmi'
207 name: 'xtesting-pi-ollivier-xtesting-mts-rmi'
208 <<: *xtesting-pi-params
209 container: 'xtesting-mts'
211 - 'xtesting-pi-{repo}-{container}-{tag}-rmi'
214 name: 'xtesting-pi-ollivier-xtesting-{tag}-{test}-run'
218 - xtesting-pi-build_tag:
221 - xtesting-pi-run-containers:
222 <<: *xtesting-pi-run-containers
225 name: 'xtesting-pi-ollivier-xtesting'
226 <<: *xtesting-pi-params
230 container: 'xtesting'
263 - 'xtesting-pi-ollivier-xtesting-{tag}-{test}-run'
266 name: 'xtesting-pi-ollivier-xtesting-mts-{tag}-{test}-run'
270 - xtesting-pi-build_tag:
273 - xtesting-pi-run-containers:
274 <<: *xtesting-pi-run-containers
277 name: 'xtesting-pi-ollivier-xtesting-mts'
278 <<: *xtesting-pi-params
282 container: 'xtesting-mts'
290 - 'xtesting-pi-ollivier-xtesting-mts-{tag}-{test}-run'
293 name: xtesting-pi-zip
298 if [ "{volumes}" != "None" ]; then
299 for i in $(echo {volumes} | tr -d '[]' |sed "s/, / /g" ); \
300 do volumes="-v $i $volumes"; done
303 if [ "{env}" != "None" ]; then
304 for i in $(eval echo {env} | tr -d '[]' |sed "s/, / /g" ); \
305 do env="-e $i $env"; done
308 if [ "{published_ports}" != "None" ]; then
309 for i in $(echo {published_ports} | tr -d '[]' |sed "s/, / /g" ); \
310 do published_ports="-p $i $published_ports"; done
312 [ ! -z "$WORKSPACE" ] && sudo rm -rf $WORKSPACE/results || true
313 if [ "{repo}" = "_" ]; then
314 image={container}:{tag}
315 elif [ "{port}" = "None" ]; then
316 image={repo}/{container}:{tag}
318 image={repo}:{port}/{container}:{tag}
320 sudo mkdir -p $WORKSPACE/results
321 sudo chown {uid}:{gid} $WORKSPACE/results
322 sudo docker run --rm \
326 -e S3_ENDPOINT_URL=https://storage.googleapis.com \
327 -e S3_DST_URL=s3://artifacts.opnfv.org/xtesting \
328 -e HTTP_DST_URL=http://artifacts.opnfv.org/xtesting \
329 -v /home/opnfv/xtesting/.boto:/etc/boto.cfg \
330 -e TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results \
331 -e TEST_DB_EXT_URL=http://testresults.opnfv.org/test/api/v1/results \
332 -e BUILD_TAG=$BUILD_TAG \
333 -v $WORKSPACE/../$JOB_NAME/results:/var/lib/xtesting/results \
337 name: 'xtesting-pi-{tag}-zip'
341 - xtesting-pi-build_tag:
345 <<: *xtesting-pi-containers
350 published_ports: '{published_ports}'
353 name: 'xtesting-pi-{tag}-zip'
354 <<: *xtesting-pi-params
358 container: 'xtesting'
362 - 'xtesting-pi-{tag}-zip'
365 name: 'xtesting-pi-{tag}-daily'
366 project-type: multijob
372 - xtesting-pi-build_tag:
374 # PyYAML and yamllint differ here
375 # see https://github.com/yaml/pyyaml/issues/234
376 # yamllint disable rule:indentation
380 - ^xtesting-(pi-)*{tag}-(daily|docker|review)$
381 # yamllint enable rule:indentation
384 name: remove former images
386 - name: 'xtesting-pi-ollivier-xtesting-{tag}-rmi'
387 <<: *xtesting-pi-jobs
388 - name: 'xtesting-pi-ollivier-xtesting-mts-{tag}-rmi'
389 <<: *xtesting-pi-jobs
391 name: pull containers
393 - name: 'xtesting-pi-ollivier-xtesting-{tag}-pull'
394 <<: *xtesting-pi-jobs
395 - name: 'xtesting-pi-ollivier-xtesting-mts-{tag}-pull'
396 <<: *xtesting-pi-jobs
398 name: ollivier/xtesting:{tag}
400 - name: 'xtesting-pi-ollivier-xtesting-{tag}-first-run'
401 <<: *xtesting-pi-jobs
402 - name: 'xtesting-pi-ollivier-xtesting-{tag}-second-run'
403 <<: *xtesting-pi-jobs
404 - name: 'xtesting-pi-ollivier-xtesting-{tag}-third-run'
405 <<: *xtesting-pi-jobs
406 - name: 'xtesting-pi-ollivier-xtesting-{tag}-fourth-run'
407 <<: *xtesting-pi-jobs
408 - name: 'xtesting-pi-ollivier-xtesting-{tag}-fifth-run'
409 <<: *xtesting-pi-jobs
410 - name: 'xtesting-pi-ollivier-xtesting-{tag}-sixth-run'
411 <<: *xtesting-pi-jobs
412 - name: 'xtesting-pi-ollivier-xtesting-{tag}-eighth-run'
413 <<: *xtesting-pi-jobs
415 name: ollivier/xtesting-mts:{tag}
417 - name: 'xtesting-pi-ollivier-xtesting-mts-{tag}-seventh-run'
418 <<: *xtesting-pi-jobs
420 name: dump all campaign data
422 - name: 'xtesting-pi-{tag}-zip'
423 <<: *xtesting-pi-jobs
429 recipients: cedric.ollivier@orange.com
432 name: 'xtesting-pi-daily'
433 <<: *xtesting-pi-params
435 - 'xtesting-pi-{tag}-daily'
447 regex: ^xtesting-pi-[a-z-0-9.]+-daily$