2 - xtesting-containers: &xtesting-containers
3 name: 'xtesting-containers'
6 container: '{container}'
9 - xtesting-params: &xtesting-params
10 name: 'xtesting-params'
39 - xtesting-jobs: &xtesting-jobs
41 current-parameters: true
51 name: xtesting-build_tag
57 - xtesting-run-containers: &xtesting-run-containers
58 name: 'xtesting-run-containers'
59 <<: *xtesting-containers
61 privileged: '{privileged}'
65 name: xtesting-pull-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 sudo docker pull $image
79 name: xtesting-run-containers
83 [ ! -z "$WORKSPACE" ] && sudo rm -rf $WORKSPACE/results || true
84 if [ "{repo}" = "_" ]; then
85 image={container}:{tag}
86 elif [ "{port}" = "None" ]; then
87 image={repo}/{container}:{tag}
89 image={repo}:{port}/{container}:{tag}
91 sudo docker run --rm \
92 --privileged={privileged} \
94 -e S3_ENDPOINT_URL=https://storage.googleapis.com \
95 -e S3_DST_URL=s3://artifacts.opnfv.org/xtesting/$BUILD_TAG/$JOB_NAME-$BUILD_ID \
96 -e HTTP_DST_URL=http://artifacts.opnfv.org/xtesting/$BUILD_TAG/$JOB_NAME-$BUILD_ID \
97 -v /home/opnfv/xtesting/.boto:/root/.boto \
98 -e TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results \
99 -e TEST_DB_EXT_URL=http://testresults.opnfv.org/test/api/v1/results \
100 -e NODE_NAME=$slave \
101 -e BUILD_TAG=$BUILD_TAG \
102 -v $WORKSPACE/../$JOB_NAME/results:/var/lib/xtesting/results \
103 $image run_tests -t {test} -p -r
106 name: xtesting-remove-images
110 if [ "{repo}" = "_" ]; then
111 image={container}:{tag}
112 elif [ "{port}" = "None" ]; then
113 image={repo}/{container}:{tag}
115 image={repo}:{port}/{container}:{tag}
117 sudo docker rmi $image || true
120 name: 'xtesting-{repo}-{container}-{tag}-pull'
125 - xtesting-pull-containers:
126 <<: *xtesting-containers
129 name: 'xtesting-opnfv-xtesting-pull'
131 container: 'xtesting'
133 - 'xtesting-{repo}-{container}-{tag}-pull'
136 name: 'xtesting-opnfv-xtesting-mts-pull'
138 container: 'xtesting-mts'
140 - 'xtesting-{repo}-{container}-{tag}-pull'
143 name: 'xtesting-{repo}-{container}-{tag}-rmi'
148 - xtesting-remove-images:
149 <<: *xtesting-containers
152 name: 'xtesting-opnfv-xtesting-rmi'
154 container: 'xtesting'
156 - 'xtesting-{repo}-{container}-{tag}-rmi'
159 name: 'xtesting-opnfv-xtesting-mts-rmi'
161 container: 'xtesting-mts'
163 - 'xtesting-{repo}-{container}-{tag}-rmi'
166 name: 'xtesting-{repo}-{container}-{tag}-{test}-run'
170 - xtesting-build_tag:
173 - xtesting-run-containers:
174 <<: *xtesting-run-containers
177 name: 'xtesting-opnfv-xtesting'
179 container: 'xtesting'
190 - 'xtesting-{repo}-{container}-{tag}-{test}-run'
193 name: 'xtesting-opnfv-xtesting-mts'
195 container: 'xtesting-mts'
201 - 'xtesting-{repo}-{container}-{tag}-{test}-run'
209 [ ! -z "$WORKSPACE" ] && sudo rm -rf $WORKSPACE/results || true
210 if [ "{repo}" = "_" ]; then
211 image={container}:{tag}
212 elif [ "{port}" = "None" ]; then
213 image={repo}/{container}:{tag}
215 image={repo}:{port}/{container}:{tag}
217 sudo docker run --rm \
218 -e S3_ENDPOINT_URL=https://storage.googleapis.com \
219 -e S3_DST_URL=s3://artifacts.opnfv.org/xtesting \
220 -e HTTP_DST_URL=http://artifacts.opnfv.org/xtesting \
221 -v /home/opnfv/xtesting/.boto:/root/.boto \
222 -e TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results \
223 -e TEST_DB_EXT_URL=http://testresults.opnfv.org/test/api/v1/results \
224 -e BUILD_TAG=$BUILD_TAG \
225 -v $WORKSPACE/../$JOB_NAME/results:/var/lib/xtesting/results \
229 name: 'xtesting-{tag}-zip'
233 - xtesting-build_tag:
237 <<: *xtesting-containers
240 name: 'xtesting-{tag}-zip'
242 container: 'xtesting'
244 - 'xtesting-{tag}-zip'
247 name: 'xtesting-{tag}-daily'
248 project-type: multijob
254 - xtesting-build_tag:
258 use-build-blocker: true
259 blocking-level: 'NODE'
261 - '^xtesting-{tag}-(daily|docker|review)$'
264 name: remove former images
266 - name: 'xtesting-opnfv-xtesting-{tag}-rmi'
268 - name: 'xtesting-opnfv-xtesting-mts-{tag}-rmi'
271 name: pull containers
273 - name: 'xtesting-opnfv-xtesting-{tag}-pull'
275 - name: 'xtesting-opnfv-xtesting-mts-{tag}-pull'
278 name: opnfv/xtesting:{tag}
280 - name: 'xtesting-opnfv-xtesting-{tag}-first-run'
282 - name: 'xtesting-opnfv-xtesting-{tag}-second-run'
284 - name: 'xtesting-opnfv-xtesting-{tag}-third-run'
286 - name: 'xtesting-opnfv-xtesting-{tag}-fourth-run'
288 - name: 'xtesting-opnfv-xtesting-{tag}-fifth-run'
290 - name: 'xtesting-opnfv-xtesting-{tag}-sixth-run'
293 name: opnfv/xtesting-mts:{tag}
295 - name: 'xtesting-opnfv-xtesting-mts-{tag}-seventh-run'
298 name: dump all campaign data
300 - name: 'xtesting-{tag}-zip'
304 name: 'xtesting-daily'
307 - 'xtesting-{tag}-daily'
319 regex: ^xtesting-[a-z0-9]+-daily$
321 - xtesting-build-containers: &xtesting-build-containers
322 name: 'xtesting-build-containers'
323 <<: *xtesting-containers
328 name: xtesting-build-containers
332 if [ "{repo}" = "_" ]; then
333 image={container}:{tag}
334 elif [ "{port}" = "None" ]; then
335 image={repo}/{container}:{tag}
337 image={repo}:{port}/{container}:{tag}
339 if [ "{ref_arg}" = "None" ]; then
342 build_arg="--build-arg {ref_arg}={ref}"
345 sudo docker build $build_arg \
346 --pull=false --no-cache --force-rm=true \
353 url: 'https://gerrit.opnfv.org/gerrit/functest-xtesting'
354 refspec: '+refs/heads/*:refs/remotes/origin/* +refs/changes/*:refs/changes/*'
358 - xtesting-dep: &xtesting-dep
359 name: 'xtesting-containers'
363 dependency: '{dependency}'
366 name: xtesting-pull-dep-images
370 if [ "_" = "_" ]; then
371 image=alpine:{dependency}
372 elif [ "_" = "None" ]; then
373 image=_/alpine:{dependency}
375 image=_:/alpine{dependency}
377 sudo docker pull $image || true
380 name: xtesting-remove-dep-images
384 if [ "_" = "_" ]; then
385 image=alpine:{dependency}
386 elif [ "_" = "None" ]; then
387 image=_/alpine:{dependency}
389 image=_:/alpine{dependency}
391 sudo docker rmi $image || true
394 name: 'xtesting-{repo}-{tag}-dep-pull'
399 - xtesting-pull-dep-images:
403 name: 'xtesting-{repo}-{tag}-dep-pull'
406 - 'xtesting-{repo}-{tag}-dep-pull'
409 name: 'xtesting-{repo}-{tag}-dep-rmi'
414 - xtesting-remove-dep-images:
418 name: 'xtesting-{repo}-{tag}-dep-rmi'
421 - 'xtesting-{repo}-{tag}-dep-rmi'
428 sudo apt-get update && sudo apt-get install software-properties-common gpg -y
429 sudo add-apt-repository -y ppa:deadsnakes/ppa
430 sudo apt-get update && sudo apt-get install python3.8 python3.8-dev \
431 python3.8-distutils \
432 python3.7 python3.7-dev python3.6 python3.6-dev \
433 python python-dev python3-pip enchant -y
434 sudo pip3 install tox tox-pip-version
438 name: 'xtesting-{tag}-tox'
443 - xtesting-patchset-created:
455 - 'xtesting-{tag}-tox'
458 name: xtesting-opnfv-xtesting-{tag}-gate
464 - 'xtesting-{repo}-{container}-{tag}-gate'
467 name: xtesting-opnfv-xtesting-mts-{tag}-gate
469 container: xtesting-mts
473 - 'xtesting-{repo}-{container}-{tag}-gate'
477 name: 'xtesting-{repo}-{container}-{tag}-gate'
485 - xtesting-build-containers:
486 <<: *xtesting-build-containers
490 name: xtesting-patchset-created
494 - patchset-created-event
495 - comment-added-contains-event:
496 comment-contains-value: 'recheck'
497 - comment-added-contains-event:
498 comment-contains-value: 'reverify'
500 - project-compare-type: 'ANT'
501 project-pattern: 'functest-xtesting'
503 - branch-compare-type: 'ANT'
504 branch-pattern: '**/{branch}'
507 name: 'xtesting-{tag}-review'
508 project-type: multijob
510 - xtesting-patchset-created:
515 - xtesting-build_tag:
519 use-build-blocker: true
520 blocking-level: 'NODE'
522 - '^xtesting-{tag}-(daily|docker|review)$'
525 name: remove former images
527 - name: 'xtesting-opnfv-xtesting-{tag}-rmi'
529 - name: 'xtesting-opnfv-xtesting-mts-{tag}-rmi'
532 name: remove dependency
534 - name: 'xtesting-{repo}-{tag}-dep-rmi'
537 name: pull dependency
539 - name: 'xtesting-{repo}-{tag}-dep-pull'
544 - name: 'xtesting-opnfv-xtesting-{tag}-gate'
547 name: opnfv/xtesting-mts
549 - name: 'xtesting-opnfv-xtesting-mts-{tag}-gate'
552 name: opnfv/xtesting:{tag}
554 - name: 'xtesting-opnfv-xtesting-{tag}-first-run'
556 - name: 'xtesting-opnfv-xtesting-{tag}-second-run'
558 - name: 'xtesting-opnfv-xtesting-{tag}-third-run'
560 - name: 'xtesting-opnfv-xtesting-{tag}-fourth-run'
562 - name: 'xtesting-opnfv-xtesting-{tag}-fifth-run'
564 - name: 'xtesting-opnfv-xtesting-{tag}-sixth-run'
567 name: opnfv/xtesting-mts:{tag}
569 - name: 'xtesting-opnfv-xtesting-mts-{tag}-seventh-run'
573 name: 'xtesting-review'
576 - 'xtesting-{tag}-review'
579 name: xtesting-review
588 regex: ^xtesting-[a-z0-9]+-review$
600 regex: ^xtesting-[a-z0-9]+-tox$
603 name: xtesting-push-containers
607 if [ "{repo}" = "_" ]; then
608 image={container}:{tag}
609 elif [ "{port}" = "None" ]; then
610 image={repo}/{container}:{tag}
612 image={repo}:{port}/{container}:{tag}
614 sudo docker push $image
617 name: xtesting-commit
623 name: 'xtesting-{repo}-{container}-{tag}-build'
631 - xtesting-build-containers:
632 <<: *xtesting-build-containers
634 - xtesting-push-containers:
635 <<: *xtesting-build-containers
639 name: xtesting-opnfv-xtesting-{tag}-build
645 - 'xtesting-{repo}-{container}-{tag}-build'
648 name: xtesting-opnfv-xtesting-mts-{tag}-build
650 container: xtesting-mts
654 - 'xtesting-{repo}-{container}-{tag}-build'
658 name: 'xtesting-{tag}-docker'
659 project-type: multijob
670 use-build-blocker: true
671 blocking-level: 'NODE'
673 - '^xtesting-{tag}-(daily|docker|review)$'
676 name: remove dependency
678 - name: 'xtesting-{repo}-{tag}-dep-rmi'
681 name: pull dependency
683 - name: 'xtesting-{repo}-{tag}-dep-pull'
688 - name: 'xtesting-opnfv-xtesting-{tag}-build'
691 name: opnfv/xtesting-mts
693 - name: 'xtesting-opnfv-xtesting-mts-{tag}-build'
700 sudo apt-get update && sudo apt-get install curl -y
701 curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sudo sh -s -- -b .
702 if [ "{repo}" = "_" ]; then
703 image={container}:{tag}
704 elif [ "{port}" = "None" ]; then
705 image={repo}/{container}:{tag}
707 image={repo}:{port}/{container}:{tag}
709 ./trivy --exit-code 1 $image
712 name: 'xtesting-{repo}-{container}-{tag}-trivy'
720 <<: *xtesting-containers
723 name: 'xtesting-opnfv-xtesting-trivy'
725 container: 'xtesting'
727 - 'xtesting-{repo}-{container}-{tag}-trivy'
729 name: 'xtesting-opnfv-xtesting-mts-trivy'
731 container: 'xtesting-mts'
733 - 'xtesting-{repo}-{container}-{tag}-trivy'
739 - 'xtesting-{tag}-docker'
742 name: xtesting-docker
751 regex: ^xtesting-[a-z0-9]+-docker$
763 regex: (?!xtesting-pi)^xtesting-[a-z-0-9]+-trivy$