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-slave
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 name: xtesting-pi-pull-containers
76 if [ "{repo}" = "_" ]; then
77 image={container}:{tag}
78 elif [ "{port}" = "None" ]; then
79 image={repo}/{container}:{tag}
81 image={repo}:{port}/{container}:{tag}
83 sudo docker pull $image
86 name: xtesting-pi-run-containers
90 volumes=; for i in $(echo {volumes} | tr -d '[] ' |sed "s/,/ /g" ); do volumes="-v $i $volumes"; done
91 env=; for i in $(eval echo {env} | tr -d '[] ' |sed "s/,/ /g" ); do env="-e $i $env"; done
92 [ ! -z "$WORKSPACE" ] && sudo rm -rf $WORKSPACE/results || true
93 if [ "{repo}" = "_" ]; then
94 image={container}:{tag}
95 elif [ "{port}" = "None" ]; then
96 image={repo}/{container}:{tag}
98 image={repo}:{port}/{container}:{tag}
100 sudo docker run --rm \
101 --privileged={privileged} \
102 --network={network} \
105 -e S3_ENDPOINT_URL=https://storage.googleapis.com \
106 -e S3_DST_URL=s3://artifacts.opnfv.org/xtesting/$BUILD_TAG/$JOB_NAME-$BUILD_ID \
107 -e HTTP_DST_URL=http://artifacts.opnfv.org/xtesting/$BUILD_TAG/$JOB_NAME-$BUILD_ID \
108 -v /home/opnfv/xtesting/.boto:/root/.boto \
109 -e TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results \
110 -e TEST_DB_EXT_URL=http://testresults.opnfv.org/test/api/v1/results \
111 -e NODE_NAME=$slave \
112 -e BUILD_TAG=$BUILD_TAG \
113 -v $WORKSPACE/../$JOB_NAME/results:/var/lib/xtesting/results \
114 $image run_tests -t {test} -p -r
117 name: xtesting-pi-remove-images
121 if [ "{repo}" = "_" ]; then
122 image={container}:{tag}
123 elif [ "{port}" = "None" ]; then
124 image={repo}/{container}:{tag}
126 image={repo}:{port}/{container}:{tag}
128 sudo docker rmi $image || true
131 name: 'xtesting-pi-{repo}-{container}-{tag}-pull'
136 - xtesting-pi-pull-containers:
137 <<: *xtesting-pi-containers
140 name: 'xtesting-pi-ollivier-xtesting-pull'
141 <<: *xtesting-pi-params
142 container: 'xtesting'
144 - 'xtesting-pi-{repo}-{container}-{tag}-pull'
147 name: 'xtesting-pi-ollivier-xtesting-mts-pull'
148 <<: *xtesting-pi-params
149 container: 'xtesting-mts'
151 - 'xtesting-pi-{repo}-{container}-{tag}-pull'
154 name: 'xtesting-pi-{repo}-{container}-{tag}-rmi'
159 - xtesting-pi-remove-images:
160 <<: *xtesting-pi-containers
163 name: 'xtesting-pi-ollivier-xtesting-rmi'
164 <<: *xtesting-pi-params
165 container: 'xtesting'
167 - 'xtesting-pi-{repo}-{container}-{tag}-rmi'
170 name: 'xtesting-pi-ollivier-xtesting-mts-rmi'
171 <<: *xtesting-pi-params
172 container: 'xtesting-mts'
174 - 'xtesting-pi-{repo}-{container}-{tag}-rmi'
177 name: 'xtesting-pi-ollivier-xtesting-{tag}-{test}-run'
181 - xtesting-pi-build_tag:
184 - xtesting-pi-run-containers:
185 <<: *xtesting-pi-run-containers
188 name: 'xtesting-pi-ollivier-xtesting'
189 <<: *xtesting-pi-params
192 container: 'xtesting'
223 - 'xtesting-pi-ollivier-xtesting-{tag}-{test}-run'
226 name: 'xtesting-pi-ollivier-xtesting-mts-{tag}-{test}-run'
230 - xtesting-pi-build_tag:
233 - xtesting-pi-run-containers:
234 <<: *xtesting-pi-run-containers
237 name: 'xtesting-pi-ollivier-xtesting-mts'
238 <<: *xtesting-pi-params
241 container: 'xtesting-mts'
247 - 'xtesting-pi-ollivier-xtesting-mts-{tag}-{test}-run'
250 name: xtesting-pi-zip
254 volumes=; for i in $(echo {volumes} | tr -d '[] ' |sed "s/,/ /g" ); do volumes="-v $i $volumes"; done
255 env=; for i in $(eval echo {env} | tr -d '[] ' |sed "s/,/ /g" ); do env="-e $i $env"; done
256 [ ! -z "$WORKSPACE" ] && sudo rm -rf $WORKSPACE/results || true
257 if [ "{repo}" = "_" ]; then
258 image={container}:{tag}
259 elif [ "{port}" = "None" ]; then
260 image={repo}/{container}:{tag}
262 image={repo}:{port}/{container}:{tag}
264 sudo docker run --rm \
267 -e S3_ENDPOINT_URL=https://storage.googleapis.com \
268 -e S3_DST_URL=s3://artifacts.opnfv.org/xtesting \
269 -e HTTP_DST_URL=http://artifacts.opnfv.org/xtesting \
270 -v /home/opnfv/xtesting/.boto:/root/.boto \
271 -e TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results \
272 -e TEST_DB_EXT_URL=http://testresults.opnfv.org/test/api/v1/results \
273 -e BUILD_TAG=$BUILD_TAG \
274 -v $WORKSPACE/../$JOB_NAME/results:/var/lib/xtesting/results \
278 name: 'xtesting-pi-{tag}-zip'
282 - xtesting-pi-build_tag:
286 <<: *xtesting-pi-containers
291 name: 'xtesting-pi-{tag}-zip'
292 <<: *xtesting-pi-params
295 container: 'xtesting'
297 - 'xtesting-pi-{tag}-zip'
300 name: 'xtesting-pi-{tag}-daily'
301 project-type: multijob
307 - xtesting-pi-build_tag:
309 # PyYAML and yamllint differ here
310 # see https://github.com/yaml/pyyaml/issues/234
311 # yamllint disable rule:indentation
315 - ^xtesting-(pi-)*{tag}-(daily|docker|review)$
316 # yamllint enable rule:indentation
319 name: remove former images
321 - name: 'xtesting-pi-ollivier-xtesting-{tag}-rmi'
322 <<: *xtesting-pi-jobs
323 - name: 'xtesting-pi-ollivier-xtesting-mts-{tag}-rmi'
324 <<: *xtesting-pi-jobs
326 name: pull containers
328 - name: 'xtesting-pi-ollivier-xtesting-{tag}-pull'
329 <<: *xtesting-pi-jobs
330 - name: 'xtesting-pi-ollivier-xtesting-mts-{tag}-pull'
331 <<: *xtesting-pi-jobs
333 name: ollivier/xtesting:{tag}
335 - name: 'xtesting-pi-ollivier-xtesting-{tag}-first-run'
336 <<: *xtesting-pi-jobs
337 - name: 'xtesting-pi-ollivier-xtesting-{tag}-second-run'
338 <<: *xtesting-pi-jobs
339 - name: 'xtesting-pi-ollivier-xtesting-{tag}-third-run'
340 <<: *xtesting-pi-jobs
341 - name: 'xtesting-pi-ollivier-xtesting-{tag}-fourth-run'
342 <<: *xtesting-pi-jobs
343 - name: 'xtesting-pi-ollivier-xtesting-{tag}-fifth-run'
344 <<: *xtesting-pi-jobs
345 - name: 'xtesting-pi-ollivier-xtesting-{tag}-sixth-run'
346 <<: *xtesting-pi-jobs
347 - name: 'xtesting-pi-ollivier-xtesting-{tag}-eighth-run'
348 <<: *xtesting-pi-jobs
350 name: ollivier/xtesting-mts:{tag}
352 - name: 'xtesting-pi-ollivier-xtesting-mts-{tag}-seventh-run'
353 <<: *xtesting-pi-jobs
355 name: dump all campaign data
357 - name: 'xtesting-pi-{tag}-zip'
358 <<: *xtesting-pi-jobs
361 name: 'xtesting-pi-daily'
362 <<: *xtesting-pi-params
364 - 'xtesting-pi-{tag}-daily'
376 regex: ^xtesting-pi-[a-z-0-9.]+-daily$