2 - xtesting-jobs: &xtesting-jobs
4 current-parameters: true
6 - xtesting-params: &xtesting-params
7 name: 'xtesting-params'
44 name: xtesting-build_tag
56 - xtesting-containers: &xtesting-containers
57 name: 'xtesting-containers'
60 container: '{container}'
63 - xtesting-run-containers: &xtesting-run-containers
64 name: 'xtesting-run-containers'
65 <<: *xtesting-containers
67 privileged: '{privileged}'
71 name: xtesting-pull-containers
75 if [ "{repo}" = "_" ]; then
76 image={container}:{tag}
77 elif [ "{port}" = "None" ]; then
78 image={repo}/{container}:{tag}
80 image={repo}:{port}/{container}:{tag}
82 sudo docker pull $image
85 name: xtesting-run-containers
89 [ ! -z "$WORKSPACE" ] && sudo rm -rf $WORKSPACE/results || true
90 if [ "{repo}" = "_" ]; then
91 image={container}:{tag}
92 elif [ "{port}" = "None" ]; then
93 image={repo}/{container}:{tag}
95 image={repo}:{port}/{container}:{tag}
97 sudo docker run --rm \
98 --privileged={privileged} \
100 -e S3_ENDPOINT_URL=https://storage.googleapis.com \
101 -e S3_DST_URL=s3://artifacts.opnfv.org/xtesting/$BUILD_TAG/$JOB_NAME-$BUILD_ID \
102 -e HTTP_DST_URL=http://artifacts.opnfv.org/xtesting/$BUILD_TAG/$JOB_NAME-$BUILD_ID \
103 -v /home/opnfv/xtesting/.boto:/root/.boto \
104 -e TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results \
105 -e TEST_DB_EXT_URL=http://testresults.opnfv.org/test/api/v1/results \
106 -e NODE_NAME=$slave \
107 -e BUILD_TAG=$BUILD_TAG \
108 -v $WORKSPACE/../$JOB_NAME/results:/var/lib/xtesting/results \
110 $image run_tests -t {test} -p -r
113 name: xtesting-remove-images
117 if [ "{repo}" = "_" ]; then
118 image={container}:{tag}
119 elif [ "{port}" = "None" ]; then
120 image={repo}/{container}:{tag}
122 image={repo}:{port}/{container}:{tag}
124 sudo docker rmi $image || true
126 - xtesting-build-containers: &xtesting-build-containers
127 name: 'xtesting-build-containers'
128 <<: *xtesting-containers
133 name: xtesting-build-containers
137 if [ "{repo}" = "_" ]; then
138 image={container}:{tag}
139 elif [ "{port}" = "None" ]; then
140 image={repo}/{container}:{tag}
142 image={repo}:{port}/{container}:{tag}
144 if [ "{ref_arg}" = "None" ]; then
147 build_arg="--build-arg {ref_arg}={ref}"
150 sudo docker build $build_arg \
151 --pull=false --no-cache --force-rm=true \
158 url: 'https://gerrit.opnfv.org/gerrit/functest-xtesting'
159 refspec: '+refs/heads/*:refs/remotes/origin/* +refs/changes/*:refs/changes/*'
164 name: 'xtesting-{repo}-{container}-{tag}-pull'
169 - xtesting-pull-containers:
170 <<: *xtesting-containers
173 name: 'xtesting-opnfv-xtesting-pull'
175 container: 'xtesting'
177 - 'xtesting-{repo}-{container}-{tag}-pull'
180 name: 'xtesting-opnfv-xtesting-mts-pull'
182 container: 'xtesting-mts'
184 - 'xtesting-{repo}-{container}-{tag}-pull'
187 name: 'xtesting-{repo}-{container}-{tag}-rmi'
192 - xtesting-remove-images:
193 <<: *xtesting-containers
196 name: 'xtesting-opnfv-xtesting-rmi'
198 container: 'xtesting'
200 - 'xtesting-{repo}-{container}-{tag}-rmi'
203 name: 'xtesting-opnfv-xtesting-mts-rmi'
205 container: 'xtesting-mts'
207 - 'xtesting-{repo}-{container}-{tag}-rmi'
210 name: 'xtesting-{repo}-{container}-{tag}-{test}-run'
214 - xtesting-build_tag:
219 - xtesting-run-containers:
220 <<: *xtesting-run-containers
223 name: 'xtesting-opnfv-xtesting'
225 container: 'xtesting'
236 - 'xtesting-{repo}-{container}-{tag}-{test}-run'
239 name: 'xtesting-opnfv-xtesting-mts'
241 container: 'xtesting-mts'
247 - 'xtesting-{repo}-{container}-{tag}-{test}-run'
255 if [ "{repo}" = "_" ]; then
256 image={container}:{tag}
257 elif [ "{port}" = "None" ]; then
258 image={repo}/{container}:{tag}
260 image={repo}:{port}/{container}:{tag}
262 sudo docker run --rm \
263 -e S3_ENDPOINT_URL=https://storage.googleapis.com \
264 -e S3_DST_URL=s3://artifacts.opnfv.org/xtesting \
265 -e HTTP_DST_URL=http://artifacts.opnfv.org/xtesting \
266 -v /home/opnfv/xtesting/.boto:/root/.boto \
267 -e TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results \
268 -e TEST_DB_EXT_URL=http://testresults.opnfv.org/test/api/v1/results \
269 -e BUILD_TAG=$BUILD_TAG \
270 -v $WORKSPACE/../$JOB_NAME/results:/var/lib/xtesting/results \
275 name: 'xtesting-{tag}-zip'
279 - xtesting-build_tag:
285 <<: *xtesting-containers
288 name: 'xtesting-{tag}-zip'
290 container: 'xtesting'
292 - 'xtesting-{tag}-zip'
295 name: 'xtesting-{tag}-daily'
296 project-type: multijob
302 - xtesting-build_tag:
308 use-build-blocker: true
309 blocking-level: 'NODE'
311 - '^xtesting-{tag}-(daily|review)$'
314 name: remove former images
316 - name: 'xtesting-opnfv-xtesting-{tag}-rmi'
318 - name: 'xtesting-opnfv-xtesting-mts-{tag}-rmi'
321 name: pull containers
323 - name: 'xtesting-opnfv-xtesting-{tag}-pull'
325 - name: 'xtesting-opnfv-xtesting-mts-{tag}-pull'
328 name: opnfv/xtesting:{tag}
330 - name: 'xtesting-opnfv-xtesting-{tag}-first-run'
332 - name: 'xtesting-opnfv-xtesting-{tag}-second-run'
334 - name: 'xtesting-opnfv-xtesting-{tag}-third-run'
336 - name: 'xtesting-opnfv-xtesting-{tag}-fourth-run'
338 - name: 'xtesting-opnfv-xtesting-{tag}-fifth-run'
340 - name: 'xtesting-opnfv-xtesting-{tag}-sixth-run'
343 name: opnfv/xtesting-mts:{tag}
345 - name: 'xtesting-opnfv-xtesting-mts-{tag}-seventh-run'
348 name: dump all campaign data
350 - name: 'xtesting-{tag}-zip'
353 - xtesting-dep: &xtesting-dep
354 name: 'xtesting-containers'
358 dependency: '{dependency}'
361 name: xtesting-pull-dep-images
365 if [ "_" = "_" ]; then
366 image=alpine:{dependency}
367 elif [ "_" = "None" ]; then
368 image=_/alpine:{dependency}
370 image=_:/alpine{dependency}
372 sudo docker pull $image || true
375 name: xtesting-remove-dep-images
379 if [ "_" = "_" ]; then
380 image=alpine:{dependency}
381 elif [ "_" = "None" ]; then
382 image=_/alpine:{dependency}
384 image=_:/alpine{dependency}
386 sudo docker rmi $image || true
389 name: 'xtesting-{repo}-{tag}-dep-pull'
394 - xtesting-pull-dep-images:
398 name: 'xtesting-{repo}-{tag}-dep-pull'
401 - 'xtesting-{repo}-{tag}-dep-pull'
404 name: 'xtesting-{repo}-{tag}-dep-rmi'
409 - xtesting-remove-dep-images:
413 name: 'xtesting-{repo}-{tag}-dep-rmi'
416 - 'xtesting-{repo}-{tag}-dep-rmi'
424 name: 'xtesting-{tag}-tox'
429 - xtesting-patchset-created:
441 - 'xtesting-{tag}-tox'
444 name: xtesting-opnfv-xtesting-{tag}-gate
450 - 'xtesting-{repo}-{container}-{tag}-gate'
453 name: xtesting-opnfv-xtesting-mts-{tag}-gate
455 container: xtesting-mts
459 - 'xtesting-{repo}-{container}-{tag}-gate'
463 name: 'xtesting-{repo}-{container}-{tag}-gate'
471 - xtesting-build-containers:
472 <<: *xtesting-build-containers
476 name: xtesting-patchset-created
480 - patchset-created-event
481 - comment-added-contains-event:
482 comment-contains-value: 'recheck'
483 - comment-added-contains-event:
484 comment-contains-value: 'reverify'
486 - project-compare-type: 'ANT'
487 project-pattern: 'functest-xtesting'
489 - branch-compare-type: 'ANT'
490 branch-pattern: '**/{branch}'
493 name: 'xtesting-{tag}-review'
494 project-type: multijob
496 - xtesting-patchset-created:
501 - xtesting-build_tag:
507 use-build-blocker: true
508 blocking-level: 'NODE'
510 - '^xtesting-{tag}-(daily|review)$'
513 name: remove former images
515 - name: 'xtesting-opnfv-xtesting-{tag}-rmi'
517 - name: 'xtesting-opnfv-xtesting-mts-{tag}-rmi'
520 name: remove dependency
522 - name: 'xtesting-{repo}-{tag}-dep-rmi'
525 name: pull dependency
527 - name: 'xtesting-{repo}-{tag}-dep-pull'
532 - name: 'xtesting-opnfv-xtesting-{tag}-gate'
535 name: opnfv/xtesting-mts
537 - name: 'xtesting-opnfv-xtesting-mts-{tag}-gate'
540 name: opnfv/xtesting:{tag}
542 - name: 'xtesting-opnfv-xtesting-{tag}-first-run'
544 - name: 'xtesting-opnfv-xtesting-{tag}-second-run'
546 - name: 'xtesting-opnfv-xtesting-{tag}-third-run'
548 - name: 'xtesting-opnfv-xtesting-{tag}-fourth-run'
550 - name: 'xtesting-opnfv-xtesting-{tag}-fifth-run'
552 - name: 'xtesting-opnfv-xtesting-{tag}-sixth-run'
555 name: opnfv/xtesting-mts:{tag}
557 - name: 'xtesting-opnfv-xtesting-mts-{tag}-seventh-run'
561 name: xtesting-commit
566 name: 'xtesting-{repo}-{container}-{tag}-build'
574 - xtesting-build-containers:
575 <<: *xtesting-build-containers
579 name: xtesting-opnfv-xtesting-{tag}-build
585 - 'xtesting-{repo}-{container}-{tag}-build'
588 name: xtesting-opnfv-xtesting-mts-{tag}-build
590 container: xtesting-mts
594 - 'xtesting-{repo}-{container}-{tag}-build'
598 name: 'xtesting-{tag}-docker'
599 project-type: multijob
612 name: remove dependency
614 - name: 'xtesting-{repo}-{tag}-dep-rmi'
617 name: pull dependency
619 - name: 'xtesting-{repo}-{tag}-dep-pull'
624 - name: 'xtesting-opnfv-xtesting-{tag}-build'
627 name: opnfv/xtesting-mts
629 - name: 'xtesting-opnfv-xtesting-mts-{tag}-build'
636 curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sudo sh -s -- -b .
637 if [ "{repo}" = "_" ]; then
638 image={container}:{tag}
639 elif [ "{port}" = "None" ]; then
640 image={repo}/{container}:{tag}
642 image={repo}:{port}/{container}:{tag}
644 ./trivy --exit-code 1 $image
647 name: 'xtesting-{repo}-{container}-{tag}-trivy'
653 <<: *xtesting-containers
656 name: 'xtesting-opnfv-xtesting-trivy'
658 container: 'xtesting'
660 - 'xtesting-{repo}-{container}-{tag}-trivy'
663 name: 'xtesting-opnfv-xtesting-mts-trivy'
665 container: 'xtesting-mts'
667 - 'xtesting-{repo}-{container}-{tag}-trivy'
673 - 'xtesting-{tag}-daily'
674 - 'xtesting-{tag}-review'
675 - 'xtesting-{tag}-docker'
688 regex: ^xtesting-[a-z-]+-daily$
691 name: xtesting-review
700 regex: ^xtesting-[a-z-]+-review$
712 regex: ^xtesting-[a-z-]+-tox$
715 name: xtesting-docker
724 regex: ^xtesting-[a-z-]+-docker$
736 regex: ^xtesting-[a-z-]+-trivy$