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'
49 - xtesting-pi-ollivier-xtesting-params: &xtesting-pi-ollivier-xtesting-params
50 name: 'xtesting-pi-ollivier-xtesting-params'
92 - xtesting-pi-jobs: &xtesting-pi-jobs
93 name: 'xtesting-pi-jobs'
94 current-parameters: true
97 name: xtesting-pi-node
104 name: xtesting-pi-build_tag
109 - xtesting-pi-run-containers: &xtesting-pi-run-containers
110 name: 'xtesting-pi-run-containers'
111 <<: *xtesting-pi-containers
112 privileged: '{privileged}'
118 published_ports: '{published_ports}'
121 name: xtesting-pi-pull-containers
125 if [ "{repo}" = "_" ]; then
126 image={container}:{tag}
127 elif [ "{port}" = "None" ]; then
128 image={repo}/{container}:{tag}
130 image={repo}:{port}/{container}:{tag}
132 sudo docker pull $image
135 name: xtesting-pi-run-containers
140 if [ "{volumes}" != "None" ]; then
141 for i in $(echo {volumes} | tr -d '[]' |sed "s/, / /g" ); \
142 do volumes="-v $i $volumes"; done
145 if [ "{env}" != "None" ]; then
146 for i in $(eval echo {env} | tr -d '[]' |sed "s/, / /g" ); \
147 do env="-e $i $env"; done
150 if [ "{published_ports}" != "None" ]; then
151 for i in $(echo {published_ports} | tr -d '[]' |sed "s/, / /g" ); \
152 do published_ports="-p $i $published_ports"; done
154 [ ! -z "$WORKSPACE" ] && sudo rm -rf $WORKSPACE/results || true
155 if [ "{repo}" = "_" ]; then
156 image={container}:{tag}
157 elif [ "{port}" = "None" ]; then
158 image={repo}/{container}:{tag}
160 image={repo}:{port}/{container}:{tag}
162 sudo mkdir -p $WORKSPACE/results
163 sudo chown {uid}:{gid} $WORKSPACE/results
164 sudo docker run --rm \
165 --privileged={privileged} \
166 --network={network} \
170 -e S3_ENDPOINT_URL=https://storage.googleapis.com \
171 -e S3_DST_URL=s3://artifacts.opnfv.org/xtesting/$BUILD_TAG/$JOB_NAME-$BUILD_ID \
172 -e HTTP_DST_URL=http://artifacts.opnfv.org/xtesting/$BUILD_TAG/$JOB_NAME-$BUILD_ID \
173 -v /home/opnfv/xtesting/.boto:/etc/boto.cfg \
174 -e TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results \
175 -e TEST_DB_EXT_URL=http://testresults.opnfv.org/test/api/v1/results \
177 -e BUILD_TAG=$BUILD_TAG \
178 -v $WORKSPACE/../$JOB_NAME/results:/var/lib/xtesting/results \
179 $image run_tests -t {test} -p -r
182 name: xtesting-pi-remove-images
186 if [ "{repo}" = "_" ]; then
187 image={container}:{tag}
188 elif [ "{port}" = "None" ]; then
189 image={repo}/{container}:{tag}
191 image={repo}:{port}/{container}:{tag}
193 sudo docker rmi $image || true
196 name: 'xtesting-pi-ollivier-xtesting-{tag}-pull'
201 - xtesting-pi-pull-containers:
202 <<: *xtesting-pi-containers
205 name: 'xtesting-pi-ollivier-xtesting-pull'
206 <<: *xtesting-pi-ollivier-xtesting-params
208 - 'xtesting-pi-ollivier-xtesting-{tag}-pull'
211 name: 'xtesting-pi-ollivier-xtesting-{tag}-rmi'
216 - xtesting-pi-remove-images:
217 <<: *xtesting-pi-containers
220 name: 'xtesting-pi-ollivier-xtesting-rmi'
221 <<: *xtesting-pi-ollivier-xtesting-params
223 - 'xtesting-pi-ollivier-xtesting-{tag}-rmi'
226 name: 'xtesting-pi-ollivier-xtesting-{tag}-{test}-run'
230 - xtesting-pi-build_tag:
233 - xtesting-pi-run-containers:
234 <<: *xtesting-pi-run-containers
238 name: 'xtesting-pi-ollivier-xtesting'
239 <<: *xtesting-pi-ollivier-xtesting-params
243 container: 'xtesting'
263 - 'xtesting-pi-ollivier-xtesting-{tag}-{test}-run'
266 name: xtesting-pi-zip
271 if [ "{volumes}" != "None" ]; then
272 for i in $(echo {volumes} | tr -d '[]' |sed "s/, / /g" ); \
273 do volumes="-v $i $volumes"; done
276 if [ "{env}" != "None" ]; then
277 for i in $(eval echo {env} | tr -d '[]' |sed "s/, / /g" ); \
278 do env="-e $i $env"; done
281 if [ "{published_ports}" != "None" ]; then
282 for i in $(echo {published_ports} | tr -d '[]' |sed "s/, / /g" ); \
283 do published_ports="-p $i $published_ports"; done
285 [ ! -z "$WORKSPACE" ] && sudo rm -rf $WORKSPACE/results || true
286 if [ "{repo}" = "_" ]; then
287 image={container}:{tag}
288 elif [ "{port}" = "None" ]; then
289 image={repo}/{container}:{tag}
291 image={repo}:{port}/{container}:{tag}
293 sudo mkdir -p $WORKSPACE/results
294 sudo chown {uid}:{gid} $WORKSPACE/results
295 sudo docker run --rm \
296 --privileged={privileged} \
297 --network={network} \
301 -e S3_ENDPOINT_URL=https://storage.googleapis.com \
302 -e S3_DST_URL=s3://artifacts.opnfv.org/xtesting \
303 -e HTTP_DST_URL=http://artifacts.opnfv.org/xtesting \
304 -v /home/opnfv/xtesting/.boto:/etc/boto.cfg \
305 -e TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results \
306 -e TEST_DB_EXT_URL=http://testresults.opnfv.org/test/api/v1/results \
308 -e BUILD_TAG=$BUILD_TAG \
309 -v $WORKSPACE/../$JOB_NAME/results:/var/lib/xtesting/results \
313 name: 'xtesting-pi-{tag}-zip'
317 - xtesting-pi-build_tag:
321 <<: *xtesting-pi-run-containers
324 name: 'xtesting-pi-zip'
325 <<: *xtesting-pi-ollivier-xtesting-params
329 container: 'xtesting'
335 - 'xtesting-pi-{tag}-zip'
338 name: 'xtesting-pi-{tag}-daily'
339 project-type: multijob
345 - xtesting-pi-build_tag:
347 # PyYAML and yamllint differ here
348 # see https://github.com/yaml/pyyaml/issues/234
349 # yamllint disable rule:indentation
353 - ^xtesting-(pi-)*{tag}-(daily|docker|review)$
354 # yamllint enable rule:indentation
357 name: remove former images
359 - name: 'xtesting-pi-ollivier-xtesting-{tag}-rmi'
360 <<: *xtesting-pi-jobs
362 name: pull containers
364 - name: 'xtesting-pi-ollivier-xtesting-{tag}-pull'
365 <<: *xtesting-pi-jobs
367 name: ollivier/xtesting:{tag}
369 - name: 'xtesting-pi-ollivier-xtesting-{tag}-first-run'
370 <<: *xtesting-pi-jobs
371 - name: 'xtesting-pi-ollivier-xtesting-{tag}-second-run'
372 <<: *xtesting-pi-jobs
373 - name: 'xtesting-pi-ollivier-xtesting-{tag}-third-run'
374 <<: *xtesting-pi-jobs
375 - name: 'xtesting-pi-ollivier-xtesting-{tag}-fourth-run'
376 <<: *xtesting-pi-jobs
377 - name: 'xtesting-pi-ollivier-xtesting-{tag}-fifth-run'
378 <<: *xtesting-pi-jobs
379 - name: 'xtesting-pi-ollivier-xtesting-{tag}-sixth-run'
380 <<: *xtesting-pi-jobs
381 - name: 'xtesting-pi-ollivier-xtesting-{tag}-eighth-run'
382 <<: *xtesting-pi-jobs
383 - name: 'xtesting-pi-ollivier-xtesting-{tag}-nineth-run'
384 <<: *xtesting-pi-jobs
386 name: dump all campaign data
388 - name: 'xtesting-pi-{tag}-zip'
389 <<: *xtesting-pi-jobs
395 recipients: cedric.ollivier@orange.com
398 name: 'xtesting-pi-daily'
399 <<: *xtesting-pi-params
401 - 'xtesting-pi-{tag}-daily'
413 regex: ^xtesting-pi-[a-z-0-9.]+-daily$