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:/root/.boto \
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 docker run --rm \
297 -e S3_ENDPOINT_URL=https://storage.googleapis.com \
298 -e S3_DST_URL=s3://artifacts.opnfv.org/xtesting \
299 -e HTTP_DST_URL=http://artifacts.opnfv.org/xtesting \
300 -v /home/opnfv/xtesting/.boto:/root/.boto \
301 -e TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results \
302 -e TEST_DB_EXT_URL=http://testresults.opnfv.org/test/api/v1/results \
303 -e BUILD_TAG=$BUILD_TAG \
304 -v $WORKSPACE/../$JOB_NAME/results:/var/lib/xtesting/results \
308 name: 'xtesting-pi-{tag}-zip'
312 - xtesting-pi-build_tag:
316 <<: *xtesting-pi-containers
321 name: 'xtesting-pi-{tag}-zip'
322 <<: *xtesting-pi-params
325 container: 'xtesting'
327 - 'xtesting-pi-{tag}-zip'
330 name: 'xtesting-pi-{tag}-daily'
331 project-type: multijob
337 - xtesting-pi-build_tag:
339 # PyYAML and yamllint differ here
340 # see https://github.com/yaml/pyyaml/issues/234
341 # yamllint disable rule:indentation
345 - ^xtesting-(pi-)*{tag}-(daily|docker|review)$
346 # yamllint enable rule:indentation
349 name: remove former images
351 - name: 'xtesting-pi-ollivier-xtesting-{tag}-rmi'
352 <<: *xtesting-pi-jobs
353 - name: 'xtesting-pi-ollivier-xtesting-mts-{tag}-rmi'
354 <<: *xtesting-pi-jobs
356 name: pull containers
358 - name: 'xtesting-pi-ollivier-xtesting-{tag}-pull'
359 <<: *xtesting-pi-jobs
360 - name: 'xtesting-pi-ollivier-xtesting-mts-{tag}-pull'
361 <<: *xtesting-pi-jobs
363 name: ollivier/xtesting:{tag}
365 - name: 'xtesting-pi-ollivier-xtesting-{tag}-first-run'
366 <<: *xtesting-pi-jobs
367 - name: 'xtesting-pi-ollivier-xtesting-{tag}-second-run'
368 <<: *xtesting-pi-jobs
369 - name: 'xtesting-pi-ollivier-xtesting-{tag}-third-run'
370 <<: *xtesting-pi-jobs
371 - name: 'xtesting-pi-ollivier-xtesting-{tag}-fourth-run'
372 <<: *xtesting-pi-jobs
373 - name: 'xtesting-pi-ollivier-xtesting-{tag}-fifth-run'
374 <<: *xtesting-pi-jobs
375 - name: 'xtesting-pi-ollivier-xtesting-{tag}-sixth-run'
376 <<: *xtesting-pi-jobs
377 - name: 'xtesting-pi-ollivier-xtesting-{tag}-eighth-run'
378 <<: *xtesting-pi-jobs
380 name: ollivier/xtesting-mts:{tag}
382 - name: 'xtesting-pi-ollivier-xtesting-mts-{tag}-seventh-run'
383 <<: *xtesting-pi-jobs
385 name: dump all campaign data
387 - name: 'xtesting-pi-{tag}-zip'
388 <<: *xtesting-pi-jobs
394 recipients: cedric.ollivier@orange.com
397 name: 'xtesting-pi-daily'
398 <<: *xtesting-pi-params
400 - 'xtesting-pi-{tag}-daily'
412 regex: ^xtesting-pi-[a-z-0-9.]+-daily$