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" ); do volumes="-v $i $volumes"; done
95 if [ "{env}" != "None" ]; then
96 for i in $(eval echo {env} | tr -d '[]' |sed "s/, / /g" ); do env="-e $i $env"; done
98 [ ! -z "$WORKSPACE" ] && sudo rm -rf $WORKSPACE/results || true
99 if [ "{repo}" = "_" ]; then
100 image={container}:{tag}
101 elif [ "{port}" = "None" ]; then
102 image={repo}/{container}:{tag}
104 image={repo}:{port}/{container}:{tag}
106 sudo docker run --rm \
107 --privileged={privileged} \
108 --network={network} \
111 -e S3_ENDPOINT_URL=https://storage.googleapis.com \
112 -e S3_DST_URL=s3://artifacts.opnfv.org/xtesting/$BUILD_TAG/$JOB_NAME-$BUILD_ID \
113 -e HTTP_DST_URL=http://artifacts.opnfv.org/xtesting/$BUILD_TAG/$JOB_NAME-$BUILD_ID \
114 -v /home/opnfv/xtesting/.boto:/root/.boto \
115 -e TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results \
116 -e TEST_DB_EXT_URL=http://testresults.opnfv.org/test/api/v1/results \
117 -e NODE_NAME=$slave \
118 -e BUILD_TAG=$BUILD_TAG \
119 -v $WORKSPACE/../$JOB_NAME/results:/var/lib/xtesting/results \
120 $image run_tests -t {test} -p -r
123 name: xtesting-pi-remove-images
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 docker rmi $image || true
137 name: 'xtesting-pi-{repo}-{container}-{tag}-pull'
142 - xtesting-pi-pull-containers:
143 <<: *xtesting-pi-containers
146 name: 'xtesting-pi-ollivier-xtesting-pull'
147 <<: *xtesting-pi-params
148 container: 'xtesting'
150 - 'xtesting-pi-{repo}-{container}-{tag}-pull'
153 name: 'xtesting-pi-ollivier-xtesting-mts-pull'
154 <<: *xtesting-pi-params
155 container: 'xtesting-mts'
157 - 'xtesting-pi-{repo}-{container}-{tag}-pull'
160 name: 'xtesting-pi-{repo}-{container}-{tag}-rmi'
165 - xtesting-pi-remove-images:
166 <<: *xtesting-pi-containers
169 name: 'xtesting-pi-ollivier-xtesting-rmi'
170 <<: *xtesting-pi-params
171 container: 'xtesting'
173 - 'xtesting-pi-{repo}-{container}-{tag}-rmi'
176 name: 'xtesting-pi-ollivier-xtesting-mts-rmi'
177 <<: *xtesting-pi-params
178 container: 'xtesting-mts'
180 - 'xtesting-pi-{repo}-{container}-{tag}-rmi'
183 name: 'xtesting-pi-ollivier-xtesting-{tag}-{test}-run'
187 - xtesting-pi-build_tag:
190 - xtesting-pi-run-containers:
191 <<: *xtesting-pi-run-containers
194 name: 'xtesting-pi-ollivier-xtesting'
195 <<: *xtesting-pi-params
198 container: 'xtesting'
229 - 'xtesting-pi-ollivier-xtesting-{tag}-{test}-run'
232 name: 'xtesting-pi-ollivier-xtesting-mts-{tag}-{test}-run'
236 - xtesting-pi-build_tag:
239 - xtesting-pi-run-containers:
240 <<: *xtesting-pi-run-containers
243 name: 'xtesting-pi-ollivier-xtesting-mts'
244 <<: *xtesting-pi-params
247 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" ); do volumes="-v $i $volumes"; done
265 if [ "{env}" != "None" ]; then
266 for i in $(eval echo {env} | tr -d '[]' |sed "s/, / /g" ); do env="-e $i $env"; done
268 [ ! -z "$WORKSPACE" ] && sudo rm -rf $WORKSPACE/results || true
269 if [ "{repo}" = "_" ]; then
270 image={container}:{tag}
271 elif [ "{port}" = "None" ]; then
272 image={repo}/{container}:{tag}
274 image={repo}:{port}/{container}:{tag}
276 sudo docker run --rm \
279 -e S3_ENDPOINT_URL=https://storage.googleapis.com \
280 -e S3_DST_URL=s3://artifacts.opnfv.org/xtesting \
281 -e HTTP_DST_URL=http://artifacts.opnfv.org/xtesting \
282 -v /home/opnfv/xtesting/.boto:/root/.boto \
283 -e TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results \
284 -e TEST_DB_EXT_URL=http://testresults.opnfv.org/test/api/v1/results \
285 -e BUILD_TAG=$BUILD_TAG \
286 -v $WORKSPACE/../$JOB_NAME/results:/var/lib/xtesting/results \
290 name: 'xtesting-pi-{tag}-zip'
294 - xtesting-pi-build_tag:
298 <<: *xtesting-pi-containers
303 name: 'xtesting-pi-{tag}-zip'
304 <<: *xtesting-pi-params
307 container: 'xtesting'
309 - 'xtesting-pi-{tag}-zip'
312 name: 'xtesting-pi-{tag}-daily'
313 project-type: multijob
319 - xtesting-pi-build_tag:
321 # PyYAML and yamllint differ here
322 # see https://github.com/yaml/pyyaml/issues/234
323 # yamllint disable rule:indentation
327 - ^xtesting-(pi-)*{tag}-(daily|docker|review)$
328 # yamllint enable rule:indentation
331 name: remove former images
333 - name: 'xtesting-pi-ollivier-xtesting-{tag}-rmi'
334 <<: *xtesting-pi-jobs
335 - name: 'xtesting-pi-ollivier-xtesting-mts-{tag}-rmi'
336 <<: *xtesting-pi-jobs
338 name: pull containers
340 - name: 'xtesting-pi-ollivier-xtesting-{tag}-pull'
341 <<: *xtesting-pi-jobs
342 - name: 'xtesting-pi-ollivier-xtesting-mts-{tag}-pull'
343 <<: *xtesting-pi-jobs
345 name: ollivier/xtesting:{tag}
347 - name: 'xtesting-pi-ollivier-xtesting-{tag}-first-run'
348 <<: *xtesting-pi-jobs
349 - name: 'xtesting-pi-ollivier-xtesting-{tag}-second-run'
350 <<: *xtesting-pi-jobs
351 - name: 'xtesting-pi-ollivier-xtesting-{tag}-third-run'
352 <<: *xtesting-pi-jobs
353 - name: 'xtesting-pi-ollivier-xtesting-{tag}-fourth-run'
354 <<: *xtesting-pi-jobs
355 - name: 'xtesting-pi-ollivier-xtesting-{tag}-fifth-run'
356 <<: *xtesting-pi-jobs
357 - name: 'xtesting-pi-ollivier-xtesting-{tag}-sixth-run'
358 <<: *xtesting-pi-jobs
359 - name: 'xtesting-pi-ollivier-xtesting-{tag}-eighth-run'
360 <<: *xtesting-pi-jobs
362 name: ollivier/xtesting-mts:{tag}
364 - name: 'xtesting-pi-ollivier-xtesting-mts-{tag}-seventh-run'
365 <<: *xtesting-pi-jobs
367 name: dump all campaign data
369 - name: 'xtesting-pi-{tag}-zip'
370 <<: *xtesting-pi-jobs
373 name: 'xtesting-pi-daily'
374 <<: *xtesting-pi-params
376 - 'xtesting-pi-{tag}-daily'
388 regex: ^xtesting-pi-[a-z-0-9.]+-daily$