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 name: xtesting-pi-pull-containers
76 if [ "{repo}" = "_" ]; then
77 image={container}:{tag}
78 elif [ "{port}" = "None" ]; then
79 image={repo}/{container}:{tag}
81 image={repo}:{port}/{container}:{tag}
83 sudo docker pull $image
86 name: xtesting-pi-run-containers
91 if [ "{volumes}" != "None" ]; then
92 for i in $(echo {volumes} | tr -d '[]' |sed "s/, / /g" ); \
93 do volumes="-v $i $volumes"; done
96 if [ "{env}" != "None" ]; then
97 for i in $(eval echo {env} | tr -d '[]' |sed "s/, / /g" ); \
98 do env="-e $i $env"; done
100 [ ! -z "$WORKSPACE" ] && sudo rm -rf $WORKSPACE/results || true
101 if [ "{repo}" = "_" ]; then
102 image={container}:{tag}
103 elif [ "{port}" = "None" ]; then
104 image={repo}/{container}:{tag}
106 image={repo}:{port}/{container}:{tag}
108 sudo docker run --rm \
109 --privileged={privileged} \
110 --network={network} \
113 -e S3_ENDPOINT_URL=https://storage.googleapis.com \
114 -e S3_DST_URL=s3://artifacts.opnfv.org/xtesting/$BUILD_TAG/$JOB_NAME-$BUILD_ID \
115 -e HTTP_DST_URL=http://artifacts.opnfv.org/xtesting/$BUILD_TAG/$JOB_NAME-$BUILD_ID \
116 -v /home/opnfv/xtesting/.boto:/root/.boto \
117 -e TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results \
118 -e TEST_DB_EXT_URL=http://testresults.opnfv.org/test/api/v1/results \
119 -e NODE_NAME=$slave \
120 -e BUILD_TAG=$BUILD_TAG \
121 -v $WORKSPACE/../$JOB_NAME/results:/var/lib/xtesting/results \
122 $image run_tests -t {test} -p -r
125 name: xtesting-pi-remove-images
129 if [ "{repo}" = "_" ]; then
130 image={container}:{tag}
131 elif [ "{port}" = "None" ]; then
132 image={repo}/{container}:{tag}
134 image={repo}:{port}/{container}:{tag}
136 sudo docker rmi $image || true
139 name: 'xtesting-pi-{repo}-{container}-{tag}-pull'
144 - xtesting-pi-pull-containers:
145 <<: *xtesting-pi-containers
148 name: 'xtesting-pi-ollivier-xtesting-pull'
149 <<: *xtesting-pi-params
150 container: 'xtesting'
152 - 'xtesting-pi-{repo}-{container}-{tag}-pull'
155 name: 'xtesting-pi-ollivier-xtesting-mts-pull'
156 <<: *xtesting-pi-params
157 container: 'xtesting-mts'
159 - 'xtesting-pi-{repo}-{container}-{tag}-pull'
162 name: 'xtesting-pi-{repo}-{container}-{tag}-rmi'
167 - xtesting-pi-remove-images:
168 <<: *xtesting-pi-containers
171 name: 'xtesting-pi-ollivier-xtesting-rmi'
172 <<: *xtesting-pi-params
173 container: 'xtesting'
175 - 'xtesting-pi-{repo}-{container}-{tag}-rmi'
178 name: 'xtesting-pi-ollivier-xtesting-mts-rmi'
179 <<: *xtesting-pi-params
180 container: 'xtesting-mts'
182 - 'xtesting-pi-{repo}-{container}-{tag}-rmi'
185 name: 'xtesting-pi-ollivier-xtesting-{tag}-{test}-run'
189 - xtesting-pi-build_tag:
192 - xtesting-pi-run-containers:
193 <<: *xtesting-pi-run-containers
196 name: 'xtesting-pi-ollivier-xtesting'
197 <<: *xtesting-pi-params
200 container: 'xtesting'
231 - 'xtesting-pi-ollivier-xtesting-{tag}-{test}-run'
234 name: 'xtesting-pi-ollivier-xtesting-mts-{tag}-{test}-run'
238 - xtesting-pi-build_tag:
241 - xtesting-pi-run-containers:
242 <<: *xtesting-pi-run-containers
245 name: 'xtesting-pi-ollivier-xtesting-mts'
246 <<: *xtesting-pi-params
249 container: 'xtesting-mts'
255 - 'xtesting-pi-ollivier-xtesting-mts-{tag}-{test}-run'
258 name: xtesting-pi-zip
263 if [ "{volumes}" != "None" ]; then
264 for i in $(echo {volumes} | tr -d '[]' |sed "s/, / /g" ); \
265 do volumes="-v $i $volumes"; done
268 if [ "{env}" != "None" ]; then
269 for i in $(eval echo {env} | tr -d '[]' |sed "s/, / /g" ); \
270 do env="-e $i $env"; done
272 [ ! -z "$WORKSPACE" ] && sudo rm -rf $WORKSPACE/results || true
273 if [ "{repo}" = "_" ]; then
274 image={container}:{tag}
275 elif [ "{port}" = "None" ]; then
276 image={repo}/{container}:{tag}
278 image={repo}:{port}/{container}:{tag}
280 sudo docker run --rm \
283 -e S3_ENDPOINT_URL=https://storage.googleapis.com \
284 -e S3_DST_URL=s3://artifacts.opnfv.org/xtesting \
285 -e HTTP_DST_URL=http://artifacts.opnfv.org/xtesting \
286 -v /home/opnfv/xtesting/.boto:/root/.boto \
287 -e TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results \
288 -e TEST_DB_EXT_URL=http://testresults.opnfv.org/test/api/v1/results \
289 -e BUILD_TAG=$BUILD_TAG \
290 -v $WORKSPACE/../$JOB_NAME/results:/var/lib/xtesting/results \
294 name: 'xtesting-pi-{tag}-zip'
298 - xtesting-pi-build_tag:
302 <<: *xtesting-pi-containers
307 name: 'xtesting-pi-{tag}-zip'
308 <<: *xtesting-pi-params
311 container: 'xtesting'
313 - 'xtesting-pi-{tag}-zip'
316 name: 'xtesting-pi-{tag}-daily'
317 project-type: multijob
323 - xtesting-pi-build_tag:
325 # PyYAML and yamllint differ here
326 # see https://github.com/yaml/pyyaml/issues/234
327 # yamllint disable rule:indentation
331 - ^xtesting-(pi-)*{tag}-(daily|docker|review)$
332 # yamllint enable rule:indentation
335 name: remove former images
337 - name: 'xtesting-pi-ollivier-xtesting-{tag}-rmi'
338 <<: *xtesting-pi-jobs
339 - name: 'xtesting-pi-ollivier-xtesting-mts-{tag}-rmi'
340 <<: *xtesting-pi-jobs
342 name: pull containers
344 - name: 'xtesting-pi-ollivier-xtesting-{tag}-pull'
345 <<: *xtesting-pi-jobs
346 - name: 'xtesting-pi-ollivier-xtesting-mts-{tag}-pull'
347 <<: *xtesting-pi-jobs
349 name: ollivier/xtesting:{tag}
351 - name: 'xtesting-pi-ollivier-xtesting-{tag}-first-run'
352 <<: *xtesting-pi-jobs
353 - name: 'xtesting-pi-ollivier-xtesting-{tag}-second-run'
354 <<: *xtesting-pi-jobs
355 - name: 'xtesting-pi-ollivier-xtesting-{tag}-third-run'
356 <<: *xtesting-pi-jobs
357 - name: 'xtesting-pi-ollivier-xtesting-{tag}-fourth-run'
358 <<: *xtesting-pi-jobs
359 - name: 'xtesting-pi-ollivier-xtesting-{tag}-fifth-run'
360 <<: *xtesting-pi-jobs
361 - name: 'xtesting-pi-ollivier-xtesting-{tag}-sixth-run'
362 <<: *xtesting-pi-jobs
363 - name: 'xtesting-pi-ollivier-xtesting-{tag}-eighth-run'
364 <<: *xtesting-pi-jobs
366 name: ollivier/xtesting-mts:{tag}
368 - name: 'xtesting-pi-ollivier-xtesting-mts-{tag}-seventh-run'
369 <<: *xtesting-pi-jobs
371 name: dump all campaign data
373 - name: 'xtesting-pi-{tag}-zip'
374 <<: *xtesting-pi-jobs
377 name: 'xtesting-pi-daily'
378 <<: *xtesting-pi-params
380 - 'xtesting-pi-{tag}-daily'
392 regex: ^xtesting-pi-[a-z-0-9.]+-daily$