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}'
78 name: xtesting-pi-pull-containers
82 if [ "{repo}" = "_" ]; then
83 image={container}:{tag}
84 elif [ "{port}" = "None" ]; then
85 image={repo}/{container}:{tag}
87 image={repo}:{port}/{container}:{tag}
89 sudo docker pull $image
92 name: xtesting-pi-run-containers
97 if [ "{volumes}" != "None" ]; then
98 for i in $(echo {volumes} | tr -d '[]' |sed "s/, / /g" ); \
99 do volumes="-v $i $volumes"; done
102 if [ "{env}" != "None" ]; then
103 for i in $(eval echo {env} | tr -d '[]' |sed "s/, / /g" ); \
104 do env="-e $i $env"; done
106 [ ! -z "$WORKSPACE" ] && sudo rm -rf $WORKSPACE/results || true
107 if [ "{repo}" = "_" ]; then
108 image={container}:{tag}
109 elif [ "{port}" = "None" ]; then
110 image={repo}/{container}:{tag}
112 image={repo}:{port}/{container}:{tag}
114 sudo docker run --rm \
115 --privileged={privileged} \
116 --network={network} \
119 -e S3_ENDPOINT_URL=https://storage.googleapis.com \
120 -e S3_DST_URL=s3://artifacts.opnfv.org/xtesting/$BUILD_TAG/$JOB_NAME-$BUILD_ID \
121 -e HTTP_DST_URL=http://artifacts.opnfv.org/xtesting/$BUILD_TAG/$JOB_NAME-$BUILD_ID \
122 -v /home/opnfv/xtesting/.boto:/root/.boto \
123 -e TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results \
124 -e TEST_DB_EXT_URL=http://testresults.opnfv.org/test/api/v1/results \
125 -e NODE_NAME=$slave \
126 -e BUILD_TAG=$BUILD_TAG \
127 -v $WORKSPACE/../$JOB_NAME/results:/var/lib/xtesting/results \
128 $image run_tests -t {test} -p -r
131 name: xtesting-pi-remove-images
135 if [ "{repo}" = "_" ]; then
136 image={container}:{tag}
137 elif [ "{port}" = "None" ]; then
138 image={repo}/{container}:{tag}
140 image={repo}:{port}/{container}:{tag}
142 sudo docker rmi $image || true
145 name: 'xtesting-pi-{repo}-{container}-{tag}-pull'
150 - xtesting-pi-pull-containers:
151 <<: *xtesting-pi-containers
154 name: 'xtesting-pi-ollivier-xtesting-pull'
155 <<: *xtesting-pi-params
156 container: 'xtesting'
158 - 'xtesting-pi-{repo}-{container}-{tag}-pull'
161 name: 'xtesting-pi-ollivier-xtesting-mts-pull'
162 <<: *xtesting-pi-params
163 container: 'xtesting-mts'
165 - 'xtesting-pi-{repo}-{container}-{tag}-pull'
168 name: 'xtesting-pi-{repo}-{container}-{tag}-rmi'
173 - xtesting-pi-remove-images:
174 <<: *xtesting-pi-containers
177 name: 'xtesting-pi-ollivier-xtesting-rmi'
178 <<: *xtesting-pi-params
179 container: 'xtesting'
181 - 'xtesting-pi-{repo}-{container}-{tag}-rmi'
184 name: 'xtesting-pi-ollivier-xtesting-mts-rmi'
185 <<: *xtesting-pi-params
186 container: 'xtesting-mts'
188 - 'xtesting-pi-{repo}-{container}-{tag}-rmi'
191 name: 'xtesting-pi-ollivier-xtesting-{tag}-{test}-run'
195 - xtesting-pi-build_tag:
198 - xtesting-pi-run-containers:
199 <<: *xtesting-pi-run-containers
202 name: 'xtesting-pi-ollivier-xtesting'
203 <<: *xtesting-pi-params
206 container: 'xtesting'
237 - 'xtesting-pi-ollivier-xtesting-{tag}-{test}-run'
240 name: 'xtesting-pi-ollivier-xtesting-mts-{tag}-{test}-run'
244 - xtesting-pi-build_tag:
247 - xtesting-pi-run-containers:
248 <<: *xtesting-pi-run-containers
251 name: 'xtesting-pi-ollivier-xtesting-mts'
252 <<: *xtesting-pi-params
255 container: 'xtesting-mts'
261 - 'xtesting-pi-ollivier-xtesting-mts-{tag}-{test}-run'
264 name: xtesting-pi-zip
269 if [ "{volumes}" != "None" ]; then
270 for i in $(echo {volumes} | tr -d '[]' |sed "s/, / /g" ); \
271 do volumes="-v $i $volumes"; done
274 if [ "{env}" != "None" ]; then
275 for i in $(eval echo {env} | tr -d '[]' |sed "s/, / /g" ); \
276 do env="-e $i $env"; done
278 [ ! -z "$WORKSPACE" ] && sudo rm -rf $WORKSPACE/results || true
279 if [ "{repo}" = "_" ]; then
280 image={container}:{tag}
281 elif [ "{port}" = "None" ]; then
282 image={repo}/{container}:{tag}
284 image={repo}:{port}/{container}:{tag}
286 sudo docker run --rm \
289 -e S3_ENDPOINT_URL=https://storage.googleapis.com \
290 -e S3_DST_URL=s3://artifacts.opnfv.org/xtesting \
291 -e HTTP_DST_URL=http://artifacts.opnfv.org/xtesting \
292 -v /home/opnfv/xtesting/.boto:/root/.boto \
293 -e TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results \
294 -e TEST_DB_EXT_URL=http://testresults.opnfv.org/test/api/v1/results \
295 -e BUILD_TAG=$BUILD_TAG \
296 -v $WORKSPACE/../$JOB_NAME/results:/var/lib/xtesting/results \
300 name: 'xtesting-pi-{tag}-zip'
304 - xtesting-pi-build_tag:
308 <<: *xtesting-pi-containers
313 name: 'xtesting-pi-{tag}-zip'
314 <<: *xtesting-pi-params
317 container: 'xtesting'
319 - 'xtesting-pi-{tag}-zip'
322 name: 'xtesting-pi-{tag}-daily'
323 project-type: multijob
329 - xtesting-pi-build_tag:
331 # PyYAML and yamllint differ here
332 # see https://github.com/yaml/pyyaml/issues/234
333 # yamllint disable rule:indentation
337 - ^xtesting-(pi-)*{tag}-(daily|docker|review)$
338 # yamllint enable rule:indentation
341 name: remove former images
343 - name: 'xtesting-pi-ollivier-xtesting-{tag}-rmi'
344 <<: *xtesting-pi-jobs
345 - name: 'xtesting-pi-ollivier-xtesting-mts-{tag}-rmi'
346 <<: *xtesting-pi-jobs
348 name: pull containers
350 - name: 'xtesting-pi-ollivier-xtesting-{tag}-pull'
351 <<: *xtesting-pi-jobs
352 - name: 'xtesting-pi-ollivier-xtesting-mts-{tag}-pull'
353 <<: *xtesting-pi-jobs
355 name: ollivier/xtesting:{tag}
357 - name: 'xtesting-pi-ollivier-xtesting-{tag}-first-run'
358 <<: *xtesting-pi-jobs
359 - name: 'xtesting-pi-ollivier-xtesting-{tag}-second-run'
360 <<: *xtesting-pi-jobs
361 - name: 'xtesting-pi-ollivier-xtesting-{tag}-third-run'
362 <<: *xtesting-pi-jobs
363 - name: 'xtesting-pi-ollivier-xtesting-{tag}-fourth-run'
364 <<: *xtesting-pi-jobs
365 - name: 'xtesting-pi-ollivier-xtesting-{tag}-fifth-run'
366 <<: *xtesting-pi-jobs
367 - name: 'xtesting-pi-ollivier-xtesting-{tag}-sixth-run'
368 <<: *xtesting-pi-jobs
369 - name: 'xtesting-pi-ollivier-xtesting-{tag}-eighth-run'
370 <<: *xtesting-pi-jobs
372 name: ollivier/xtesting-mts:{tag}
374 - name: 'xtesting-pi-ollivier-xtesting-mts-{tag}-seventh-run'
375 <<: *xtesting-pi-jobs
377 name: dump all campaign data
379 - name: 'xtesting-pi-{tag}-zip'
380 <<: *xtesting-pi-jobs
383 name: 'xtesting-pi-daily'
384 <<: *xtesting-pi-params
386 - 'xtesting-pi-{tag}-daily'
398 regex: ^xtesting-pi-[a-z-0-9.]+-daily$