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}'
80 name: xtesting-pi-pull-containers
84 if [ "{repo}" = "_" ]; then
85 image={container}:{tag}
86 elif [ "{port}" = "None" ]; then
87 image={repo}/{container}:{tag}
89 image={repo}:{port}/{container}:{tag}
91 sudo docker pull $image
94 name: xtesting-pi-run-containers
99 if [ "{volumes}" != "None" ]; then
100 for i in $(echo {volumes} | tr -d '[]' |sed "s/, / /g" ); \
101 do volumes="-v $i $volumes"; done
104 if [ "{env}" != "None" ]; then
105 for i in $(eval echo {env} | tr -d '[]' |sed "s/, / /g" ); \
106 do env="-e $i $env"; 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} \
123 -e S3_ENDPOINT_URL=https://storage.googleapis.com \
124 -e S3_DST_URL=s3://artifacts.opnfv.org/xtesting/$BUILD_TAG/$JOB_NAME-$BUILD_ID \
125 -e HTTP_DST_URL=http://artifacts.opnfv.org/xtesting/$BUILD_TAG/$JOB_NAME-$BUILD_ID \
126 -v /home/opnfv/xtesting/.boto:/etc/boto.cfg \
127 -e TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results \
128 -e TEST_DB_EXT_URL=http://testresults.opnfv.org/test/api/v1/results \
129 -e NODE_NAME=$slave \
130 -e BUILD_TAG=$BUILD_TAG \
131 -v $WORKSPACE/../$JOB_NAME/results:/var/lib/xtesting/results \
132 $image run_tests -t {test} -p -r
135 name: xtesting-pi-remove-images
139 if [ "{repo}" = "_" ]; then
140 image={container}:{tag}
141 elif [ "{port}" = "None" ]; then
142 image={repo}/{container}:{tag}
144 image={repo}:{port}/{container}:{tag}
146 sudo docker rmi $image || true
149 name: 'xtesting-pi-{repo}-{container}-{tag}-pull'
154 - xtesting-pi-pull-containers:
155 <<: *xtesting-pi-containers
158 name: 'xtesting-pi-ollivier-xtesting-pull'
159 <<: *xtesting-pi-params
160 container: 'xtesting'
162 - 'xtesting-pi-{repo}-{container}-{tag}-pull'
165 name: 'xtesting-pi-ollivier-xtesting-mts-pull'
166 <<: *xtesting-pi-params
167 container: 'xtesting-mts'
169 - 'xtesting-pi-{repo}-{container}-{tag}-pull'
172 name: 'xtesting-pi-{repo}-{container}-{tag}-rmi'
177 - xtesting-pi-remove-images:
178 <<: *xtesting-pi-containers
181 name: 'xtesting-pi-ollivier-xtesting-rmi'
182 <<: *xtesting-pi-params
183 container: 'xtesting'
185 - 'xtesting-pi-{repo}-{container}-{tag}-rmi'
188 name: 'xtesting-pi-ollivier-xtesting-mts-rmi'
189 <<: *xtesting-pi-params
190 container: 'xtesting-mts'
192 - 'xtesting-pi-{repo}-{container}-{tag}-rmi'
195 name: 'xtesting-pi-ollivier-xtesting-{tag}-{test}-run'
199 - xtesting-pi-build_tag:
202 - xtesting-pi-run-containers:
203 <<: *xtesting-pi-run-containers
206 name: 'xtesting-pi-ollivier-xtesting'
207 <<: *xtesting-pi-params
210 container: 'xtesting'
243 - 'xtesting-pi-ollivier-xtesting-{tag}-{test}-run'
246 name: 'xtesting-pi-ollivier-xtesting-mts-{tag}-{test}-run'
250 - xtesting-pi-build_tag:
253 - xtesting-pi-run-containers:
254 <<: *xtesting-pi-run-containers
257 name: 'xtesting-pi-ollivier-xtesting-mts'
258 <<: *xtesting-pi-params
261 container: 'xtesting-mts'
269 - 'xtesting-pi-ollivier-xtesting-mts-{tag}-{test}-run'
272 name: xtesting-pi-zip
277 if [ "{volumes}" != "None" ]; then
278 for i in $(echo {volumes} | tr -d '[]' |sed "s/, / /g" ); \
279 do volumes="-v $i $volumes"; done
282 if [ "{env}" != "None" ]; then
283 for i in $(eval echo {env} | tr -d '[]' |sed "s/, / /g" ); \
284 do env="-e $i $env"; done
286 [ ! -z "$WORKSPACE" ] && sudo rm -rf $WORKSPACE/results || true
287 if [ "{repo}" = "_" ]; then
288 image={container}:{tag}
289 elif [ "{port}" = "None" ]; then
290 image={repo}/{container}:{tag}
292 image={repo}:{port}/{container}:{tag}
294 sudo mkdir -p $WORKSPACE/results
295 sudo chown {uid}:{gid} $WORKSPACE/results
296 sudo docker run --rm \
299 -e S3_ENDPOINT_URL=https://storage.googleapis.com \
300 -e S3_DST_URL=s3://artifacts.opnfv.org/xtesting \
301 -e HTTP_DST_URL=http://artifacts.opnfv.org/xtesting \
302 -v /home/opnfv/xtesting/.boto:/etc/boto.cfg \
303 -e TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results \
304 -e TEST_DB_EXT_URL=http://testresults.opnfv.org/test/api/v1/results \
305 -e BUILD_TAG=$BUILD_TAG \
306 -v $WORKSPACE/../$JOB_NAME/results:/var/lib/xtesting/results \
310 name: 'xtesting-pi-{tag}-zip'
314 - xtesting-pi-build_tag:
318 <<: *xtesting-pi-containers
325 name: 'xtesting-pi-{tag}-zip'
326 <<: *xtesting-pi-params
329 container: 'xtesting'
333 - 'xtesting-pi-{tag}-zip'
336 name: 'xtesting-pi-{tag}-daily'
337 project-type: multijob
343 - xtesting-pi-build_tag:
345 # PyYAML and yamllint differ here
346 # see https://github.com/yaml/pyyaml/issues/234
347 # yamllint disable rule:indentation
351 - ^xtesting-(pi-)*{tag}-(daily|docker|review)$
352 # yamllint enable rule:indentation
355 name: remove former images
357 - name: 'xtesting-pi-ollivier-xtesting-{tag}-rmi'
358 <<: *xtesting-pi-jobs
359 - name: 'xtesting-pi-ollivier-xtesting-mts-{tag}-rmi'
360 <<: *xtesting-pi-jobs
362 name: pull containers
364 - name: 'xtesting-pi-ollivier-xtesting-{tag}-pull'
365 <<: *xtesting-pi-jobs
366 - name: 'xtesting-pi-ollivier-xtesting-mts-{tag}-pull'
367 <<: *xtesting-pi-jobs
369 name: ollivier/xtesting:{tag}
371 - name: 'xtesting-pi-ollivier-xtesting-{tag}-first-run'
372 <<: *xtesting-pi-jobs
373 - name: 'xtesting-pi-ollivier-xtesting-{tag}-second-run'
374 <<: *xtesting-pi-jobs
375 - name: 'xtesting-pi-ollivier-xtesting-{tag}-third-run'
376 <<: *xtesting-pi-jobs
377 - name: 'xtesting-pi-ollivier-xtesting-{tag}-fourth-run'
378 <<: *xtesting-pi-jobs
379 - name: 'xtesting-pi-ollivier-xtesting-{tag}-fifth-run'
380 <<: *xtesting-pi-jobs
381 - name: 'xtesting-pi-ollivier-xtesting-{tag}-sixth-run'
382 <<: *xtesting-pi-jobs
383 - name: 'xtesting-pi-ollivier-xtesting-{tag}-eighth-run'
384 <<: *xtesting-pi-jobs
386 name: ollivier/xtesting-mts:{tag}
388 - name: 'xtesting-pi-ollivier-xtesting-mts-{tag}-seventh-run'
389 <<: *xtesting-pi-jobs
391 name: dump all campaign data
393 - name: 'xtesting-pi-{tag}-zip'
394 <<: *xtesting-pi-jobs
400 recipients: cedric.ollivier@orange.com
403 name: 'xtesting-pi-daily'
404 <<: *xtesting-pi-params
406 - 'xtesting-pi-{tag}-daily'
418 regex: ^xtesting-pi-[a-z-0-9.]+-daily$