2 - xtesting-jobs: &xtesting-jobs
4 current-parameters: true
6 - xtesting-params: &xtesting-params
7 name: 'xtesting-params'
32 - xtesting-containers: &xtesting-containers
33 name: 'xtesting-containers'
36 container: '{container}'
39 - xtesting-run-containers: &xtesting-run-containers
40 name: 'xtesting-build-containers'
41 <<: *xtesting-containers
44 - xtesting-build-containers: &xtesting-build-containers
45 name: 'xtesting-build-containers'
46 <<: *xtesting-containers
51 name: xtesting-pull-containers
55 if [ "{repo}" = "_" ]; then
56 image={container}:{tag}
57 elif [ "{port}" = "None" ]; then
58 image={repo}/{container}:{tag}
60 image={repo}:{port}/{container}:{tag}
62 sudo docker pull $image
65 name: xtesting-build-containers
69 if [ "{repo}" = "_" ]; then
70 image={container}:{tag}
71 elif [ "{port}" = "None" ]; then
72 image={repo}/{container}:{tag}
74 image={repo}:{port}/{container}:{tag}
76 if [ "{ref_arg}" = "None" ]; then
79 build_arg="--build-arg {ref_arg}={ref}"
82 sudo docker build $build_arg \
83 --pull=false --no-cache --force-rm=true \
87 name: xtesting-run-containers
91 [ ! -z "$WORKSPACE" ] && sudo rm -rf $WORKSPACE/* || true
92 if [ "{repo}" = "_" ]; then
93 image={container}:{tag}
94 elif [ "{port}" = "None" ]; then
95 image={repo}/{container}:{tag}
97 image={repo}:{port}/{container}:{tag}
99 sudo docker run --rm \
100 -v $WORKSPACE/../$JOB_NAME/results:/var/lib/xtesting/results \
101 $image run_tests -t {test}
103 gsutil -m cp -r $WORKSPACE/ \
104 gs://artifacts.opnfv.org/xtesting/$JOB_NAME-$BUILD_ID > /dev/null 2>&1
105 find $WORKSPACE -type f \
107 "http://artifacts.opnfv.org/xtesting/$JOB_NAME-$BUILD_ID/%P\n"
111 name: xtesting-remove-images
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 docker rmi $image || true
128 url: https://gerrit.opnfv.org/gerrit/functest-xtesting
129 refspec: '+refs/changes/*:refs/changes/*'
134 name: 'xtesting-{repo}-{container}-{tag}-pull'
138 - xtesting-pull-containers:
139 <<: *xtesting-containers
142 name: 'xtesting-opnfv-xtesting-pull'
144 container: 'xtesting'
146 - 'xtesting-{repo}-{container}-{tag}-pull'
149 name: 'xtesting-{repo}-{container}-{tag}-rmi'
153 - xtesting-remove-images:
154 <<: *xtesting-containers
157 name: 'xtesting-opnfv-xtesting-rmi'
159 container: 'xtesting'
161 - 'xtesting-{repo}-{container}-{tag}-rmi'
164 name: 'xtesting-{repo}-{container}-{tag}-{test}-run'
168 - xtesting-run-containers:
169 <<: *xtesting-run-containers
172 name: 'xtesting-opnfv-xtesting'
174 container: 'xtesting'
182 - 'xtesting-{repo}-{container}-{tag}-{test}-run'
185 name: 'xtesting-{tag}-daily'
186 project-type: multijob
193 use-build-blocker: true
194 blocking-level: 'NODE'
196 - '^xtesting-[a-z]+-(daily|check|gate)$'
199 name: remove former images
201 - name: 'xtesting-opnfv-xtesting-{tag}-rmi'
204 name: pull containers
206 - name: 'xtesting-opnfv-xtesting-{tag}-pull'
209 name: opnfv/xtesting:{tag}
211 - name: 'xtesting-opnfv-xtesting-{tag}-first-run'
213 - name: 'xtesting-opnfv-xtesting-{tag}-second-run'
215 - name: 'xtesting-opnfv-xtesting-{tag}-third-run'
217 - name: 'xtesting-opnfv-xtesting-{tag}-fourth-run'
219 - name: 'xtesting-opnfv-xtesting-{tag}-fifth-run'
223 name: 'xtesting-{repo}-{container}-{tag}-gate'
230 - xtesting-build-containers:
231 <<: *xtesting-build-containers
235 name: 'xtesting-{repo}-{container}-{tag}-check'
244 - xtesting-build-containers:
245 <<: *xtesting-build-containers
249 name: 'xtesting-_-alpine-3.9-rmi'
255 - 'xtesting-{repo}-{container}-{tag}-rmi'
258 name: 'xtesting-_-alpine-3.9-pull'
264 - 'xtesting-{repo}-{container}-{tag}-pull'
267 name: xtesting-opnfv-xtesting-{tag}-build
273 - 'xtesting-{repo}-{container}-{tag}-gate'
274 - 'xtesting-{repo}-{container}-{tag}-check'
277 name: 'xtesting-{tag}-check'
278 project-type: multijob
285 use-build-blocker: true
286 blocking-level: 'NODE'
288 - '^xtesting-[a-z]+-(daily|check|gate)$'
291 name: remove former images
293 - name: 'xtesting-opnfv-xtesting-{tag}-rmi'
296 name: remove dependencies
298 - name: 'xtesting-_-alpine-3.9-rmi'
301 name: pull dependencies
303 - name: 'xtesting-_-alpine-3.9-pull'
306 name: opnfv/functest-xtesting
308 - name: 'xtesting-opnfv-xtesting-{tag}-check'
311 name: opnfv/xtesting:{tag}
313 - name: 'xtesting-opnfv-xtesting-{tag}-first-run'
315 - name: 'xtesting-opnfv-xtesting-{tag}-second-run'
317 - name: 'xtesting-opnfv-xtesting-{tag}-third-run'
319 - name: 'xtesting-opnfv-xtesting-{tag}-fourth-run'
321 - name: 'xtesting-opnfv-xtesting-{tag}-fifth-run'
325 name: xtesting-patchset-created
328 server-name: 'gerrit.opnfv.org'
330 - patchset-created-event
331 - comment-added-contains-event:
332 comment-contains-value: 'recheck'
333 - comment-added-contains-event:
334 comment-contains-value: 'reverify'
336 - project-compare-type: 'ANT'
337 project-pattern: 'functest-xtesting'
339 - branch-compare-type: 'ANT'
340 branch-pattern: '**/{branch}'
348 name: 'xtesting-{tag}-gate'
349 project-type: multijob
351 - xtesting-patchset-created:
357 use-build-blocker: true
358 blocking-level: 'NODE'
360 - '^xtesting-[a-z]+-(daily|check|gate)$'
363 name: remove former images
365 - name: 'xtesting-opnfv-xtesting-{tag}-rmi'
368 name: remove dependencies
370 - name: 'xtesting-_-alpine-3.9-rmi'
373 name: pull dependencies
375 - name: 'xtesting-_-alpine-3.9-pull'
378 name: opnfv/functest-xtesting
380 - name: 'xtesting-opnfv-xtesting-{tag}-gate'
383 name: opnfv/xtesting:{tag}
385 - name: 'xtesting-opnfv-xtesting-{tag}-first-run'
387 - name: 'xtesting-opnfv-xtesting-{tag}-second-run'
389 - name: 'xtesting-opnfv-xtesting-{tag}-third-run'
391 - name: 'xtesting-opnfv-xtesting-{tag}-fourth-run'
393 - name: 'xtesting-opnfv-xtesting-{tag}-fifth-run'
400 - 'xtesting-{tag}-daily'
401 - 'xtesting-{tag}-check'
402 - 'xtesting-{tag}-gate'
414 regex: ^xtesting-[a-z]+-(daily|check|gate)$