2 - xtesting-containers: &xtesting-containers
3 name: 'xtesting-containers'
6 container: '{container}'
9 - xtesting-params: &xtesting-params
10 name: 'xtesting-params'
51 - xtesting-jobs: &xtesting-jobs
53 current-parameters: true
63 name: xtesting-build_tag
69 - xtesting-run-containers: &xtesting-run-containers
70 name: 'xtesting-run-containers'
71 <<: *xtesting-containers
73 privileged: '{privileged}'
77 name: xtesting-pull-containers
81 if [ "{repo}" = "_" ]; then
82 image={container}:{tag}
83 elif [ "{port}" = "None" ]; then
84 image={repo}/{container}:{tag}
86 image={repo}:{port}/{container}:{tag}
88 sudo docker pull $image
91 name: xtesting-run-containers
95 [ ! -z "$WORKSPACE" ] && sudo rm -rf $WORKSPACE/results || true
96 if [ "{repo}" = "_" ]; then
97 image={container}:{tag}
98 elif [ "{port}" = "None" ]; then
99 image={repo}/{container}:{tag}
101 image={repo}:{port}/{container}:{tag}
103 sudo docker run --rm \
104 --privileged={privileged} \
105 --network={network} \
106 -e S3_ENDPOINT_URL=https://storage.googleapis.com \
107 -e S3_DST_URL=s3://artifacts.opnfv.org/xtesting/$BUILD_TAG/$JOB_NAME-$BUILD_ID \
108 -e HTTP_DST_URL=http://artifacts.opnfv.org/xtesting/$BUILD_TAG/$JOB_NAME-$BUILD_ID \
109 -v /home/opnfv/xtesting/.boto:/root/.boto \
110 -e TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results \
111 -e TEST_DB_EXT_URL=http://testresults.opnfv.org/test/api/v1/results \
112 -e NODE_NAME=$slave \
113 -e BUILD_TAG=$BUILD_TAG \
114 -v $WORKSPACE/../$JOB_NAME/results:/var/lib/xtesting/results \
115 $image run_tests -t {test} -p -r
118 name: xtesting-remove-images
122 if [ "{repo}" = "_" ]; then
123 image={container}:{tag}
124 elif [ "{port}" = "None" ]; then
125 image={repo}/{container}:{tag}
127 image={repo}:{port}/{container}:{tag}
129 sudo docker rmi $image || true
132 name: 'xtesting-{repo}-{container}-{tag}-pull'
137 - xtesting-pull-containers:
138 <<: *xtesting-containers
141 name: 'xtesting-opnfv-xtesting-pull'
143 container: 'xtesting'
145 - 'xtesting-{repo}-{container}-{tag}-pull'
148 name: 'xtesting-opnfv-xtesting-mts-pull'
150 container: 'xtesting-mts'
152 - 'xtesting-{repo}-{container}-{tag}-pull'
155 name: 'xtesting-{repo}-{container}-{tag}-rmi'
160 - xtesting-remove-images:
161 <<: *xtesting-containers
164 name: 'xtesting-opnfv-xtesting-rmi'
166 container: 'xtesting'
168 - 'xtesting-{repo}-{container}-{tag}-rmi'
171 name: 'xtesting-opnfv-xtesting-mts-rmi'
173 container: 'xtesting-mts'
175 - 'xtesting-{repo}-{container}-{tag}-rmi'
178 name: 'xtesting-{repo}-{container}-{tag}-{test}-run'
182 - xtesting-build_tag:
185 - xtesting-run-containers:
186 <<: *xtesting-run-containers
189 name: 'xtesting-opnfv-xtesting'
191 container: 'xtesting'
203 - {'tag': 'leguer', 'test': 'eighth'}
204 - {'tag': 'kali', 'test': 'eighth'}
205 - {'tag': 'jerma', 'test': 'eighth'}
206 - {'tag': 'iruya', 'test': 'eighth'}
207 - {'tag': 'hunter', 'test': 'eighth'}
209 - 'xtesting-{repo}-{container}-{tag}-{test}-run'
212 name: 'xtesting-opnfv-xtesting-mts'
214 container: 'xtesting-mts'
220 - 'xtesting-{repo}-{container}-{tag}-{test}-run'
228 [ ! -z "$WORKSPACE" ] && sudo rm -rf $WORKSPACE/results || true
229 if [ "{repo}" = "_" ]; then
230 image={container}:{tag}
231 elif [ "{port}" = "None" ]; then
232 image={repo}/{container}:{tag}
234 image={repo}:{port}/{container}:{tag}
236 sudo docker run --rm \
237 -e S3_ENDPOINT_URL=https://storage.googleapis.com \
238 -e S3_DST_URL=s3://artifacts.opnfv.org/xtesting \
239 -e HTTP_DST_URL=http://artifacts.opnfv.org/xtesting \
240 -v /home/opnfv/xtesting/.boto:/root/.boto \
241 -e TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results \
242 -e TEST_DB_EXT_URL=http://testresults.opnfv.org/test/api/v1/results \
243 -e BUILD_TAG=$BUILD_TAG \
244 -v $WORKSPACE/../$JOB_NAME/results:/var/lib/xtesting/results \
248 name: 'xtesting-{tag}-zip'
252 - xtesting-build_tag:
256 <<: *xtesting-containers
259 name: 'xtesting-{tag}-zip'
261 container: 'xtesting'
263 - 'xtesting-{tag}-zip'
266 name: 'xtesting-{tag}-daily'
267 project-type: multijob
273 - xtesting-build_tag:
277 use-build-blocker: true
278 blocking-level: 'NODE'
280 - '^xtesting-{tag}-(daily|docker|review)$'
283 name: remove former images
285 - name: 'xtesting-opnfv-xtesting-{tag}-rmi'
287 - name: 'xtesting-opnfv-xtesting-mts-{tag}-rmi'
290 name: pull containers
292 - name: 'xtesting-opnfv-xtesting-{tag}-pull'
294 - name: 'xtesting-opnfv-xtesting-mts-{tag}-pull'
297 name: opnfv/xtesting:{tag}
299 - name: 'xtesting-opnfv-xtesting-{tag}-first-run'
301 - name: 'xtesting-opnfv-xtesting-{tag}-second-run'
303 - name: 'xtesting-opnfv-xtesting-{tag}-third-run'
305 - name: 'xtesting-opnfv-xtesting-{tag}-fourth-run'
307 - name: 'xtesting-opnfv-xtesting-{tag}-fifth-run'
309 - name: 'xtesting-opnfv-xtesting-{tag}-sixth-run'
311 - name: 'xtesting-opnfv-xtesting-{tag}-eighth-run'
314 name: opnfv/xtesting-mts:{tag}
316 - name: 'xtesting-opnfv-xtesting-mts-{tag}-seventh-run'
319 name: dump all campaign data
321 - name: 'xtesting-{tag}-zip'
325 name: 'xtesting-daily'
328 - 'xtesting-{tag}-daily'
340 regex: ^xtesting-[a-z0-9.]+-daily$
342 - xtesting-build-containers: &xtesting-build-containers
343 name: 'xtesting-build-containers'
344 <<: *xtesting-containers
347 buildargs: '{buildargs}'
351 name: xtesting-build-containers
355 if [ "{repo}" = "_" ]; then
356 image={container}:{tag}
357 elif [ "{port}" = "None" ]; then
358 image={repo}/{container}:{tag}
360 image={repo}:{port}/{container}:{tag}
363 if [ "{buildargs}" != "None" ]; then
364 build_args="{buildargs}"
366 if [ "{ref_arg}" != "None" ]; then
367 build_args="$build_args --build-arg {ref_arg}={ref}"
370 if [ "{from}" != "None" ]; then
371 sed -i {from} Dockerfile
373 sudo docker build $build_args \
374 --pull=false --no-cache --force-rm=true \
381 url: 'https://gerrit.opnfv.org/gerrit/functest-xtesting'
382 refspec: '+refs/heads/*:refs/remotes/origin/* +refs/changes/*:refs/changes/*'
386 - xtesting-dep: &xtesting-dep
387 name: 'xtesting-containers'
391 dependency: '{dependency}'
394 name: xtesting-pull-dep-images
398 if [ "_" = "_" ]; then
399 image=alpine:{dependency}
400 elif [ "" = "None" ]; then
401 image=_/alpine:{dependency}
403 image=_:/alpine:{dependency}
405 sudo docker pull $image || true
408 name: xtesting-remove-dep-images
412 if [ "_" = "_" ]; then
413 image=alpine:{dependency}
414 elif [ "" = "None" ]; then
415 image=_/alpine:{dependency}
417 image=_:/alpine:{dependency}
419 sudo docker rmi $image || true
422 name: 'xtesting-{repo}-{tag}-dep-pull'
427 - xtesting-pull-dep-images:
431 name: 'xtesting-{repo}-{tag}-dep-pull'
434 - 'xtesting-{repo}-{tag}-dep-pull'
437 name: 'xtesting-{repo}-{tag}-dep-rmi'
442 - xtesting-remove-dep-images:
446 name: 'xtesting-{repo}-{tag}-dep-rmi'
449 - 'xtesting-{repo}-{tag}-dep-rmi'
456 sudo apt-get update && sudo apt-get install \
457 software-properties-common gpg -y
458 sudo add-apt-repository -y ppa:deadsnakes/ppa
459 sudo apt-get update && sudo apt-get install python3.8 \
460 python3.8-dev python3.8-distutils \
461 python3.7 python3.7-dev python3.6 python3.6-dev \
462 python python-dev python3-pip enchant -y
463 sudo pip3 install tox tox-pip-version
468 name: 'xtesting-{tag}-tox'
473 - xtesting-patchset-created:
485 - 'xtesting-{tag}-tox'
488 name: 'xtesting-{repo}-{container}-{tag}-gate'
496 - xtesting-build-containers:
497 <<: *xtesting-build-containers
499 buildargs: '{buildargs}'
502 name: xtesting-opnfv-xtesting-{tag}-gate
508 - 'xtesting-{repo}-{container}-{tag}-gate'
511 name: xtesting-opnfv-xtesting-mts-{tag}-gate
513 container: xtesting-mts
517 - 'xtesting-{repo}-{container}-{tag}-gate'
521 name: xtesting-patchset-created
525 - patchset-created-event
526 - comment-added-contains-event:
527 comment-contains-value: 'recheck'
528 - comment-added-contains-event:
529 comment-contains-value: 'reverify'
531 - project-compare-type: 'ANT'
532 project-pattern: 'functest-xtesting'
534 - branch-compare-type: 'ANT'
535 branch-pattern: '**/{branch}'
538 name: 'xtesting-{tag}-review'
539 project-type: multijob
541 - xtesting-patchset-created:
546 - xtesting-build_tag:
550 use-build-blocker: true
551 blocking-level: 'NODE'
553 - '^xtesting-{tag}-(daily|docker|review)$'
556 name: remove former images
558 - name: 'xtesting-opnfv-xtesting-{tag}-rmi'
560 - name: 'xtesting-opnfv-xtesting-mts-{tag}-rmi'
563 name: remove dependency
565 - name: 'xtesting-{repo}-{tag}-dep-rmi'
568 name: pull dependency
570 - name: 'xtesting-{repo}-{tag}-dep-pull'
575 - name: 'xtesting-opnfv-xtesting-{tag}-gate'
578 name: opnfv/xtesting-mts
580 - name: 'xtesting-opnfv-xtesting-mts-{tag}-gate'
583 name: opnfv/xtesting:{tag}
585 - name: 'xtesting-opnfv-xtesting-{tag}-first-run'
587 - name: 'xtesting-opnfv-xtesting-{tag}-second-run'
589 - name: 'xtesting-opnfv-xtesting-{tag}-third-run'
591 - name: 'xtesting-opnfv-xtesting-{tag}-fourth-run'
593 - name: 'xtesting-opnfv-xtesting-{tag}-fifth-run'
595 - name: 'xtesting-opnfv-xtesting-{tag}-sixth-run'
597 - name: 'xtesting-opnfv-xtesting-{tag}-eighth-run'
600 name: opnfv/xtesting-mts:{tag}
602 - name: 'xtesting-opnfv-xtesting-mts-{tag}-seventh-run'
606 name: 'xtesting-review'
609 - 'xtesting-{tag}-review'
612 name: xtesting-review
621 regex: ^xtesting-[a-z0-9.]+-review$
633 regex: ^xtesting-[a-z0-9.]+-tox$
636 name: xtesting-push-containers
640 if [ "{repo}" = "_" ]; then
641 image={container}:{tag}
642 elif [ "{port}" = "None" ]; then
643 image={repo}/{container}:{tag}
645 image={repo}:{port}/{container}:{tag}
647 sudo docker push $image
650 name: xtesting-commit
656 name: 'xtesting-{repo}-{container}-{tag}-build'
664 - xtesting-build-containers:
665 <<: *xtesting-build-containers
667 buildargs: '{buildargs}'
668 - xtesting-push-containers:
669 <<: *xtesting-build-containers
673 name: xtesting-opnfv-xtesting-{tag}-build
679 - 'xtesting-{repo}-{container}-{tag}-build'
682 name: xtesting-opnfv-xtesting-mts-{tag}-build
684 container: xtesting-mts
688 - 'xtesting-{repo}-{container}-{tag}-build'
692 name: 'xtesting-{tag}-docker'
693 project-type: multijob
704 use-build-blocker: true
705 blocking-level: 'NODE'
707 - '^xtesting-{tag}-(daily|docker|review)$'
710 name: remove dependency
712 - name: 'xtesting-{repo}-{tag}-dep-rmi'
715 name: pull dependency
717 - name: 'xtesting-{repo}-{tag}-dep-pull'
722 - name: 'xtesting-opnfv-xtesting-{tag}-build'
725 name: opnfv/xtesting-mts
727 - name: 'xtesting-opnfv-xtesting-mts-{tag}-build'
734 sudo apt-get update && sudo apt-get install curl -y
736 curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sudo sh -s -- -b .
737 if [ "{repo}" = "_" ]; then
738 image={container}:{tag}
739 elif [ "{port}" = "None" ]; then
740 image={repo}/{container}:{tag}
742 image={repo}:{port}/{container}:{tag}
744 ./trivy --exit-code 1 $image
747 name: 'xtesting-{repo}-{container}-{tag}-trivy'
755 <<: *xtesting-containers
758 name: 'xtesting-opnfv-xtesting-trivy'
760 container: 'xtesting'
762 - 'xtesting-{repo}-{container}-{tag}-trivy'
765 name: 'xtesting-opnfv-xtesting-mts-trivy'
767 container: 'xtesting-mts'
769 - 'xtesting-{repo}-{container}-{tag}-trivy'
775 - 'xtesting-{tag}-docker'
778 name: xtesting-docker
787 regex: ^xtesting-[a-z0-9.]+-docker$
799 regex: (?!xtesting-pi)^xtesting-[a-z-0-9.]+-trivy$