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-node
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 published_ports: '{published_ports}'
81 name: xtesting-pi-pull-containers
85 if [ "{repo}" = "_" ]; then
86 image={container}:{tag}
87 elif [ "{port}" = "None" ]; then
88 image={repo}/{container}:{tag}
90 image={repo}:{port}/{container}:{tag}
92 sudo docker pull $image
95 name: xtesting-pi-run-containers
100 if [ "{volumes}" != "None" ]; then
101 for i in $(echo {volumes} | tr -d '[]' |sed "s/, / /g" ); \
102 do volumes="-v $i $volumes"; done
105 if [ "{env}" != "None" ]; then
106 for i in $(eval echo {env} | tr -d '[]' |sed "s/, / /g" ); \
107 do env="-e $i $env"; done
110 if [ "{published_ports}" != "None" ]; then
111 for i in $(echo {published_ports} | tr -d '[]' |sed "s/, / /g" ); \
112 do published_ports="-p $i $published_ports"; done
114 [ ! -z "$WORKSPACE" ] && sudo rm -rf $WORKSPACE/results || true
115 if [ "{repo}" = "_" ]; then
116 image={container}:{tag}
117 elif [ "{port}" = "None" ]; then
118 image={repo}/{container}:{tag}
120 image={repo}:{port}/{container}:{tag}
122 sudo mkdir -p $WORKSPACE/results
123 sudo chown {uid}:{gid} $WORKSPACE/results
124 sudo docker run --rm \
125 --privileged={privileged} \
126 --network={network} \
130 -e S3_ENDPOINT_URL=https://storage.googleapis.com \
131 -e S3_DST_URL=s3://artifacts.opnfv.org/xtesting/$BUILD_TAG/$JOB_NAME-$BUILD_ID \
132 -e HTTP_DST_URL=http://artifacts.opnfv.org/xtesting/$BUILD_TAG/$JOB_NAME-$BUILD_ID \
133 -v /home/opnfv/xtesting/.boto:/etc/boto.cfg \
134 -e TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results \
135 -e TEST_DB_EXT_URL=http://testresults.opnfv.org/test/api/v1/results \
137 -e BUILD_TAG=$BUILD_TAG \
138 -v $WORKSPACE/../$JOB_NAME/results:/var/lib/xtesting/results \
139 $image run_tests -t {test} -p -r
142 name: xtesting-pi-remove-images
146 if [ "{repo}" = "_" ]; then
147 image={container}:{tag}
148 elif [ "{port}" = "None" ]; then
149 image={repo}/{container}:{tag}
151 image={repo}:{port}/{container}:{tag}
153 sudo docker rmi $image || true
156 name: 'xtesting-pi-{repo}-{container}-{tag}-pull'
161 - xtesting-pi-pull-containers:
162 <<: *xtesting-pi-containers
165 name: 'xtesting-pi-ollivier-xtesting-pull'
166 <<: *xtesting-pi-params
167 container: 'xtesting'
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-{tag}-{test}-run'
192 - xtesting-pi-build_tag:
195 - xtesting-pi-run-containers:
196 <<: *xtesting-pi-run-containers
199 name: 'xtesting-pi-ollivier-xtesting'
200 <<: *xtesting-pi-params
204 container: 'xtesting'
224 - 'xtesting-pi-ollivier-xtesting-{tag}-{test}-run'
227 name: xtesting-pi-zip
232 if [ "{volumes}" != "None" ]; then
233 for i in $(echo {volumes} | tr -d '[]' |sed "s/, / /g" ); \
234 do volumes="-v $i $volumes"; done
237 if [ "{env}" != "None" ]; then
238 for i in $(eval echo {env} | tr -d '[]' |sed "s/, / /g" ); \
239 do env="-e $i $env"; done
242 if [ "{published_ports}" != "None" ]; then
243 for i in $(echo {published_ports} | tr -d '[]' |sed "s/, / /g" ); \
244 do published_ports="-p $i $published_ports"; done
246 [ ! -z "$WORKSPACE" ] && sudo rm -rf $WORKSPACE/results || true
247 if [ "{repo}" = "_" ]; then
248 image={container}:{tag}
249 elif [ "{port}" = "None" ]; then
250 image={repo}/{container}:{tag}
252 image={repo}:{port}/{container}:{tag}
254 sudo mkdir -p $WORKSPACE/results
255 sudo chown {uid}:{gid} $WORKSPACE/results
256 sudo docker run --rm \
260 -e S3_ENDPOINT_URL=https://storage.googleapis.com \
261 -e S3_DST_URL=s3://artifacts.opnfv.org/xtesting \
262 -e HTTP_DST_URL=http://artifacts.opnfv.org/xtesting \
263 -v /home/opnfv/xtesting/.boto:/etc/boto.cfg \
264 -e TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results \
265 -e TEST_DB_EXT_URL=http://testresults.opnfv.org/test/api/v1/results \
266 -e BUILD_TAG=$BUILD_TAG \
267 -v $WORKSPACE/../$JOB_NAME/results:/var/lib/xtesting/results \
271 name: 'xtesting-pi-{tag}-zip'
275 - xtesting-pi-build_tag:
279 <<: *xtesting-pi-containers
284 published_ports: '{published_ports}'
287 name: 'xtesting-pi-{tag}-zip'
288 <<: *xtesting-pi-params
292 container: 'xtesting'
296 - 'xtesting-pi-{tag}-zip'
299 name: 'xtesting-pi-{tag}-daily'
300 project-type: multijob
306 - xtesting-pi-build_tag:
308 # PyYAML and yamllint differ here
309 # see https://github.com/yaml/pyyaml/issues/234
310 # yamllint disable rule:indentation
314 - ^xtesting-(pi-)*{tag}-(daily|docker|review)$
315 # yamllint enable rule:indentation
318 name: remove former images
320 - name: 'xtesting-pi-ollivier-xtesting-{tag}-rmi'
321 <<: *xtesting-pi-jobs
323 name: pull containers
325 - name: 'xtesting-pi-ollivier-xtesting-{tag}-pull'
326 <<: *xtesting-pi-jobs
328 name: ollivier/xtesting:{tag}
330 - name: 'xtesting-pi-ollivier-xtesting-{tag}-first-run'
331 <<: *xtesting-pi-jobs
332 - name: 'xtesting-pi-ollivier-xtesting-{tag}-second-run'
333 <<: *xtesting-pi-jobs
334 - name: 'xtesting-pi-ollivier-xtesting-{tag}-third-run'
335 <<: *xtesting-pi-jobs
336 - name: 'xtesting-pi-ollivier-xtesting-{tag}-fourth-run'
337 <<: *xtesting-pi-jobs
338 - name: 'xtesting-pi-ollivier-xtesting-{tag}-fifth-run'
339 <<: *xtesting-pi-jobs
340 - name: 'xtesting-pi-ollivier-xtesting-{tag}-sixth-run'
341 <<: *xtesting-pi-jobs
342 - name: 'xtesting-pi-ollivier-xtesting-{tag}-eighth-run'
343 <<: *xtesting-pi-jobs
344 - name: 'xtesting-pi-ollivier-xtesting-{tag}-nineth-run'
345 <<: *xtesting-pi-jobs
347 name: dump all campaign data
349 - name: 'xtesting-pi-{tag}-zip'
350 <<: *xtesting-pi-jobs
356 recipients: cedric.ollivier@orange.com
359 name: 'xtesting-pi-daily'
360 <<: *xtesting-pi-params
362 - 'xtesting-pi-{tag}-daily'
374 regex: ^xtesting-pi-[a-z-0-9.]+-daily$