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-node
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 published_ports: '{published_ports}'
75 name: xtesting-pi-pull-containers
79 if [ "{repo}" = "_" ]; then
80 image={container}:{tag}
81 elif [ "{port}" = "None" ]; then
82 image={repo}/{container}:{tag}
84 image={repo}:{port}/{container}:{tag}
86 sudo docker pull $image
89 name: xtesting-pi-run-containers
94 if [ "{volumes}" != "None" ]; then
95 for i in $(echo {volumes} | tr -d '[]' |sed "s/, / /g" ); \
96 do volumes="-v $i $volumes"; done
99 if [ "{env}" != "None" ]; then
100 for i in $(eval echo {env} | tr -d '[]' |sed "s/, / /g" ); \
101 do env="-e $i $env"; done
104 if [ "{published_ports}" != "None" ]; then
105 for i in $(echo {published_ports} | tr -d '[]' |sed "s/, / /g" ); \
106 do published_ports="-p $i $published_ports"; 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} \
124 -e S3_ENDPOINT_URL=https://storage.googleapis.com \
125 -e S3_DST_URL=s3://artifacts.opnfv.org/xtesting/$BUILD_TAG/$JOB_NAME-$BUILD_ID \
126 -e HTTP_DST_URL=http://artifacts.opnfv.org/xtesting/$BUILD_TAG/$JOB_NAME-$BUILD_ID \
127 -v /home/opnfv/xtesting/.boto:/etc/boto.cfg \
128 -e TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results \
129 -e TEST_DB_EXT_URL=http://testresults.opnfv.org/test/api/v1/results \
131 -e BUILD_TAG=$BUILD_TAG \
132 -v $WORKSPACE/../$JOB_NAME/results:/var/lib/xtesting/results \
133 $image run_tests -t {test} -p -r
136 name: xtesting-pi-remove-images
140 if [ "{repo}" = "_" ]; then
141 image={container}:{tag}
142 elif [ "{port}" = "None" ]; then
143 image={repo}/{container}:{tag}
145 image={repo}:{port}/{container}:{tag}
147 sudo docker rmi $image || true
150 name: 'xtesting-pi-{repo}-{container}-{tag}-pull'
155 - xtesting-pi-pull-containers:
156 <<: *xtesting-pi-containers
159 name: 'xtesting-pi-ollivier-xtesting-pull'
160 <<: *xtesting-pi-params
161 container: 'xtesting'
163 - 'xtesting-pi-{repo}-{container}-{tag}-pull'
166 name: 'xtesting-pi-{repo}-{container}-{tag}-rmi'
171 - xtesting-pi-remove-images:
172 <<: *xtesting-pi-containers
175 name: 'xtesting-pi-ollivier-xtesting-rmi'
176 <<: *xtesting-pi-params
177 container: 'xtesting'
179 - 'xtesting-pi-{repo}-{container}-{tag}-rmi'
182 name: 'xtesting-pi-ollivier-xtesting-{tag}-{test}-run'
186 - xtesting-pi-build_tag:
189 - xtesting-pi-run-containers:
190 <<: *xtesting-pi-run-containers
193 name: 'xtesting-pi-ollivier-xtesting'
194 <<: *xtesting-pi-params
198 container: 'xtesting'
218 - 'xtesting-pi-ollivier-xtesting-{tag}-{test}-run'
221 name: xtesting-pi-zip
226 if [ "{volumes}" != "None" ]; then
227 for i in $(echo {volumes} | tr -d '[]' |sed "s/, / /g" ); \
228 do volumes="-v $i $volumes"; done
231 if [ "{env}" != "None" ]; then
232 for i in $(eval echo {env} | tr -d '[]' |sed "s/, / /g" ); \
233 do env="-e $i $env"; done
236 if [ "{published_ports}" != "None" ]; then
237 for i in $(echo {published_ports} | tr -d '[]' |sed "s/, / /g" ); \
238 do published_ports="-p $i $published_ports"; done
240 [ ! -z "$WORKSPACE" ] && sudo rm -rf $WORKSPACE/results || true
241 if [ "{repo}" = "_" ]; then
242 image={container}:{tag}
243 elif [ "{port}" = "None" ]; then
244 image={repo}/{container}:{tag}
246 image={repo}:{port}/{container}:{tag}
248 sudo mkdir -p $WORKSPACE/results
249 sudo chown {uid}:{gid} $WORKSPACE/results
250 sudo docker run --rm \
254 -e S3_ENDPOINT_URL=https://storage.googleapis.com \
255 -e S3_DST_URL=s3://artifacts.opnfv.org/xtesting \
256 -e HTTP_DST_URL=http://artifacts.opnfv.org/xtesting \
257 -v /home/opnfv/xtesting/.boto:/etc/boto.cfg \
258 -e TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results \
259 -e TEST_DB_EXT_URL=http://testresults.opnfv.org/test/api/v1/results \
260 -e BUILD_TAG=$BUILD_TAG \
261 -v $WORKSPACE/../$JOB_NAME/results:/var/lib/xtesting/results \
265 name: 'xtesting-pi-{tag}-zip'
269 - xtesting-pi-build_tag:
273 <<: *xtesting-pi-containers
278 published_ports: '{published_ports}'
281 name: 'xtesting-pi-{tag}-zip'
282 <<: *xtesting-pi-params
286 container: 'xtesting'
290 - 'xtesting-pi-{tag}-zip'
293 name: 'xtesting-pi-{tag}-daily'
294 project-type: multijob
300 - xtesting-pi-build_tag:
302 # PyYAML and yamllint differ here
303 # see https://github.com/yaml/pyyaml/issues/234
304 # yamllint disable rule:indentation
308 - ^xtesting-(pi-)*{tag}-(daily|docker|review)$
309 # yamllint enable rule:indentation
312 name: remove former images
314 - name: 'xtesting-pi-ollivier-xtesting-{tag}-rmi'
315 <<: *xtesting-pi-jobs
317 name: pull containers
319 - name: 'xtesting-pi-ollivier-xtesting-{tag}-pull'
320 <<: *xtesting-pi-jobs
322 name: ollivier/xtesting:{tag}
324 - name: 'xtesting-pi-ollivier-xtesting-{tag}-first-run'
325 <<: *xtesting-pi-jobs
326 - name: 'xtesting-pi-ollivier-xtesting-{tag}-second-run'
327 <<: *xtesting-pi-jobs
328 - name: 'xtesting-pi-ollivier-xtesting-{tag}-third-run'
329 <<: *xtesting-pi-jobs
330 - name: 'xtesting-pi-ollivier-xtesting-{tag}-fourth-run'
331 <<: *xtesting-pi-jobs
332 - name: 'xtesting-pi-ollivier-xtesting-{tag}-fifth-run'
333 <<: *xtesting-pi-jobs
334 - name: 'xtesting-pi-ollivier-xtesting-{tag}-sixth-run'
335 <<: *xtesting-pi-jobs
336 - name: 'xtesting-pi-ollivier-xtesting-{tag}-eighth-run'
337 <<: *xtesting-pi-jobs
338 - name: 'xtesting-pi-ollivier-xtesting-{tag}-nineth-run'
339 <<: *xtesting-pi-jobs
341 name: dump all campaign data
343 - name: 'xtesting-pi-{tag}-zip'
344 <<: *xtesting-pi-jobs
350 recipients: cedric.ollivier@orange.com
353 name: 'xtesting-pi-daily'
354 <<: *xtesting-pi-params
356 - 'xtesting-pi-{tag}-daily'
368 regex: ^xtesting-pi-[a-z-0-9.]+-daily$