2 - xtesting-containers: &xtesting-containers
3 name: 'xtesting-containers'
6 container: '{container}'
9 - xtesting-params: &xtesting-params
10 name: 'xtesting-params'
23 branch: stable/wallaby
57 - xtesting-jobs: &xtesting-jobs
59 current-parameters: true
69 name: xtesting-build_tag
75 - xtesting-run-containers: &xtesting-run-containers
76 name: 'xtesting-run-containers'
77 <<: *xtesting-containers
79 privileged: '{privileged}'
83 name: xtesting-pull-containers
87 if [ "{repo}" = "_" ]; then
88 image={container}:{tag}
89 elif [ "{port}" = "None" ]; then
90 image={repo}/{container}:{tag}
92 image={repo}:{port}/{container}:{tag}
94 sudo docker pull $image
97 name: xtesting-run-containers
101 [ ! -z "$WORKSPACE" ] && sudo rm -rf $WORKSPACE/results || true
102 if [ "{repo}" = "_" ]; then
103 image={container}:{tag}
104 elif [ "{port}" = "None" ]; then
105 image={repo}/{container}:{tag}
107 image={repo}:{port}/{container}:{tag}
109 sudo docker run --rm \
110 --privileged={privileged} \
111 --network={network} \
112 -e S3_ENDPOINT_URL=https://storage.googleapis.com \
113 -e S3_DST_URL=s3://artifacts.opnfv.org/xtesting/$BUILD_TAG/$JOB_NAME-$BUILD_ID \
114 -e HTTP_DST_URL=http://artifacts.opnfv.org/xtesting/$BUILD_TAG/$JOB_NAME-$BUILD_ID \
115 -v /home/opnfv/xtesting/.boto:/root/.boto \
116 -e TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results \
117 -e TEST_DB_EXT_URL=http://testresults.opnfv.org/test/api/v1/results \
118 -e NODE_NAME=$slave \
119 -e BUILD_TAG=$BUILD_TAG \
120 -v $WORKSPACE/../$JOB_NAME/results:/var/lib/xtesting/results \
121 $image run_tests -t {test} -p -r
124 name: xtesting-remove-images
128 if [ "{repo}" = "_" ]; then
129 image={container}:{tag}
130 elif [ "{port}" = "None" ]; then
131 image={repo}/{container}:{tag}
133 image={repo}:{port}/{container}:{tag}
135 sudo docker rmi $image || true
138 name: 'xtesting-{repo}-{container}-{tag}-pull'
143 - xtesting-pull-containers:
144 <<: *xtesting-containers
147 name: 'xtesting-opnfv-xtesting-pull'
149 container: 'xtesting'
151 - 'xtesting-{repo}-{container}-{tag}-pull'
154 name: 'xtesting-opnfv-xtesting-mts-pull'
156 container: 'xtesting-mts'
158 - 'xtesting-{repo}-{container}-{tag}-pull'
161 name: 'xtesting-{repo}-{container}-{tag}-rmi'
166 - xtesting-remove-images:
167 <<: *xtesting-containers
170 name: 'xtesting-opnfv-xtesting-rmi'
172 container: 'xtesting'
174 - 'xtesting-{repo}-{container}-{tag}-rmi'
177 name: 'xtesting-opnfv-xtesting-mts-rmi'
179 container: 'xtesting-mts'
181 - 'xtesting-{repo}-{container}-{tag}-rmi'
184 name: 'xtesting-{repo}-{container}-{tag}-{test}-run'
188 - xtesting-build_tag:
191 - xtesting-run-containers:
192 <<: *xtesting-run-containers
195 name: 'xtesting-opnfv-xtesting'
197 container: 'xtesting'
209 - {'tag': 'leguer', 'test': 'eighth'}
210 - {'tag': 'kali', 'test': 'eighth'}
211 - {'tag': 'jerma', 'test': 'eighth'}
212 - {'tag': 'iruya', 'test': 'eighth'}
213 - {'tag': 'hunter', 'test': 'eighth'}
215 - 'xtesting-{repo}-{container}-{tag}-{test}-run'
218 name: 'xtesting-opnfv-xtesting-mts'
220 container: 'xtesting-mts'
226 - 'xtesting-{repo}-{container}-{tag}-{test}-run'
234 [ ! -z "$WORKSPACE" ] && sudo rm -rf $WORKSPACE/results || true
235 if [ "{repo}" = "_" ]; then
236 image={container}:{tag}
237 elif [ "{port}" = "None" ]; then
238 image={repo}/{container}:{tag}
240 image={repo}:{port}/{container}:{tag}
242 sudo docker run --rm \
243 -e S3_ENDPOINT_URL=https://storage.googleapis.com \
244 -e S3_DST_URL=s3://artifacts.opnfv.org/xtesting \
245 -e HTTP_DST_URL=http://artifacts.opnfv.org/xtesting \
246 -v /home/opnfv/xtesting/.boto:/root/.boto \
247 -e TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results \
248 -e TEST_DB_EXT_URL=http://testresults.opnfv.org/test/api/v1/results \
249 -e BUILD_TAG=$BUILD_TAG \
250 -v $WORKSPACE/../$JOB_NAME/results:/var/lib/xtesting/results \
254 name: 'xtesting-{tag}-zip'
258 - xtesting-build_tag:
262 <<: *xtesting-containers
265 name: 'xtesting-{tag}-zip'
267 container: 'xtesting'
269 - 'xtesting-{tag}-zip'
272 name: 'xtesting-{tag}-daily'
273 project-type: multijob
279 - xtesting-build_tag:
283 use-build-blocker: true
284 blocking-level: 'NODE'
286 - '^xtesting-{tag}-(daily|docker|review)$'
289 name: remove former images
291 - name: 'xtesting-opnfv-xtesting-{tag}-rmi'
293 - name: 'xtesting-opnfv-xtesting-mts-{tag}-rmi'
296 name: pull containers
298 - name: 'xtesting-opnfv-xtesting-{tag}-pull'
300 - name: 'xtesting-opnfv-xtesting-mts-{tag}-pull'
303 name: opnfv/xtesting:{tag}
305 - name: 'xtesting-opnfv-xtesting-{tag}-first-run'
307 - name: 'xtesting-opnfv-xtesting-{tag}-second-run'
309 - name: 'xtesting-opnfv-xtesting-{tag}-third-run'
311 - name: 'xtesting-opnfv-xtesting-{tag}-fourth-run'
313 - name: 'xtesting-opnfv-xtesting-{tag}-fifth-run'
315 - name: 'xtesting-opnfv-xtesting-{tag}-sixth-run'
317 - name: 'xtesting-opnfv-xtesting-{tag}-eighth-run'
320 name: opnfv/xtesting-mts:{tag}
322 - name: 'xtesting-opnfv-xtesting-mts-{tag}-seventh-run'
325 name: dump all campaign data
327 - name: 'xtesting-{tag}-zip'
331 name: 'xtesting-daily'
334 - 'xtesting-{tag}-daily'
346 regex: ^xtesting-[a-z0-9.]+-daily$
348 - xtesting-build-containers: &xtesting-build-containers
349 name: 'xtesting-build-containers'
350 <<: *xtesting-containers
353 buildargs: '{buildargs}'
357 name: xtesting-build-containers
361 if [ "{repo}" = "_" ]; then
362 image={container}:{tag}
363 elif [ "{port}" = "None" ]; then
364 image={repo}/{container}:{tag}
366 image={repo}:{port}/{container}:{tag}
369 if [ "{buildargs}" != "None" ]; then
370 build_args="{buildargs}"
372 if [ "{ref_arg}" != "None" ]; then
373 build_args="$build_args --build-arg {ref_arg}={ref}"
376 if [ "{from}" != "None" ]; then
377 sed -i {from} Dockerfile
379 sudo docker build $build_args \
380 --pull=false --no-cache --force-rm=true \
387 url: 'https://gerrit.opnfv.org/gerrit/functest-xtesting'
388 refspec: '+refs/heads/*:refs/remotes/origin/* +refs/changes/*:refs/changes/*'
392 - xtesting-dep: &xtesting-dep
393 name: 'xtesting-containers'
397 dependency: '{dependency}'
400 name: xtesting-pull-dep-images
404 if [ "_" = "_" ]; then
405 image=alpine:{dependency}
406 elif [ "" = "None" ]; then
407 image=_/alpine:{dependency}
409 image=_:/alpine:{dependency}
411 sudo docker pull $image || true
414 name: xtesting-remove-dep-images
418 if [ "_" = "_" ]; then
419 image=alpine:{dependency}
420 elif [ "" = "None" ]; then
421 image=_/alpine:{dependency}
423 image=_:/alpine:{dependency}
425 sudo docker rmi $image || true
428 name: 'xtesting-{repo}-{tag}-dep-pull'
433 - xtesting-pull-dep-images:
437 name: 'xtesting-{repo}-{tag}-dep-pull'
440 - 'xtesting-{repo}-{tag}-dep-pull'
443 name: 'xtesting-{repo}-{tag}-dep-rmi'
448 - xtesting-remove-dep-images:
452 name: 'xtesting-{repo}-{tag}-dep-rmi'
455 - 'xtesting-{repo}-{tag}-dep-rmi'
462 sudo apt-get update && sudo apt-get install \
463 software-properties-common gpg -y
464 sudo add-apt-repository -y ppa:deadsnakes/ppa
465 sudo apt-get update && sudo apt-get install python3.8 \
466 python3.8-dev python3.8-distutils \
467 python3.7 python3.7-dev python3.6 python3.6-dev \
468 python python-dev python3-pip enchant -y
469 sudo pip3 install tox tox-pip-version
474 name: 'xtesting-{tag}-tox'
479 - xtesting-patchset-created:
491 - 'xtesting-{tag}-tox'
494 name: 'xtesting-{repo}-{container}-{tag}-gate'
502 - xtesting-build-containers:
503 <<: *xtesting-build-containers
505 buildargs: '{buildargs}'
508 name: xtesting-opnfv-xtesting-{tag}-gate
514 - 'xtesting-{repo}-{container}-{tag}-gate'
517 name: xtesting-opnfv-xtesting-mts-{tag}-gate
519 container: xtesting-mts
523 - 'xtesting-{repo}-{container}-{tag}-gate'
527 name: xtesting-patchset-created
531 - patchset-created-event
532 - comment-added-contains-event:
533 comment-contains-value: 'recheck'
534 - comment-added-contains-event:
535 comment-contains-value: 'reverify'
537 - project-compare-type: 'ANT'
538 project-pattern: 'functest-xtesting'
540 - branch-compare-type: 'ANT'
541 branch-pattern: '**/{branch}'
544 name: 'xtesting-{tag}-review'
545 project-type: multijob
547 - xtesting-patchset-created:
552 - xtesting-build_tag:
556 use-build-blocker: true
557 blocking-level: 'NODE'
559 - '^xtesting-{tag}-(daily|docker|review)$'
562 name: remove former images
564 - name: 'xtesting-opnfv-xtesting-{tag}-rmi'
566 - name: 'xtesting-opnfv-xtesting-mts-{tag}-rmi'
569 name: remove dependency
571 - name: 'xtesting-{repo}-{tag}-dep-rmi'
574 name: pull dependency
576 - name: 'xtesting-{repo}-{tag}-dep-pull'
581 - name: 'xtesting-opnfv-xtesting-{tag}-gate'
584 name: opnfv/xtesting-mts
586 - name: 'xtesting-opnfv-xtesting-mts-{tag}-gate'
589 name: opnfv/xtesting:{tag}
591 - name: 'xtesting-opnfv-xtesting-{tag}-first-run'
593 - name: 'xtesting-opnfv-xtesting-{tag}-second-run'
595 - name: 'xtesting-opnfv-xtesting-{tag}-third-run'
597 - name: 'xtesting-opnfv-xtesting-{tag}-fourth-run'
599 - name: 'xtesting-opnfv-xtesting-{tag}-fifth-run'
601 - name: 'xtesting-opnfv-xtesting-{tag}-sixth-run'
603 - name: 'xtesting-opnfv-xtesting-{tag}-eighth-run'
606 name: opnfv/xtesting-mts:{tag}
608 - name: 'xtesting-opnfv-xtesting-mts-{tag}-seventh-run'
612 name: 'xtesting-review'
615 - 'xtesting-{tag}-review'
618 name: xtesting-review
627 regex: ^xtesting-[a-z0-9.]+-review$
639 regex: ^xtesting-[a-z0-9.]+-tox$
642 name: xtesting-push-containers
646 if [ "{repo}" = "_" ]; then
647 image={container}:{tag}
648 elif [ "{port}" = "None" ]; then
649 image={repo}/{container}:{tag}
651 image={repo}:{port}/{container}:{tag}
653 sudo docker push $image
656 name: xtesting-commit
662 name: 'xtesting-{repo}-{container}-{tag}-build'
670 - xtesting-build-containers:
671 <<: *xtesting-build-containers
673 buildargs: '{buildargs}'
674 - xtesting-push-containers:
675 <<: *xtesting-build-containers
679 name: xtesting-opnfv-xtesting-{tag}-build
685 - 'xtesting-{repo}-{container}-{tag}-build'
688 name: xtesting-opnfv-xtesting-mts-{tag}-build
690 container: xtesting-mts
694 - 'xtesting-{repo}-{container}-{tag}-build'
698 name: 'xtesting-{tag}-docker'
699 project-type: multijob
710 use-build-blocker: true
711 blocking-level: 'NODE'
713 - '^xtesting-{tag}-(daily|docker|review)$'
716 name: remove dependency
718 - name: 'xtesting-{repo}-{tag}-dep-rmi'
721 name: pull dependency
723 - name: 'xtesting-{repo}-{tag}-dep-pull'
728 - name: 'xtesting-opnfv-xtesting-{tag}-build'
731 name: opnfv/xtesting-mts
733 - name: 'xtesting-opnfv-xtesting-mts-{tag}-build'
740 sudo apt-get update && sudo apt-get install curl -y
742 curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sudo sh -s -- -b .
743 if [ "{repo}" = "_" ]; then
744 image={container}:{tag}
745 elif [ "{port}" = "None" ]; then
746 image={repo}/{container}:{tag}
748 image={repo}:{port}/{container}:{tag}
750 ./trivy --exit-code 1 $image
753 name: 'xtesting-{repo}-{container}-{tag}-trivy'
761 <<: *xtesting-containers
764 name: 'xtesting-opnfv-xtesting-trivy'
766 container: 'xtesting'
768 - 'xtesting-{repo}-{container}-{tag}-trivy'
771 name: 'xtesting-opnfv-xtesting-mts-trivy'
773 container: 'xtesting-mts'
775 - 'xtesting-{repo}-{container}-{tag}-trivy'
781 - 'xtesting-{tag}-docker'
784 name: xtesting-docker
793 regex: ^xtesting-[a-z0-9.]+-docker$
805 regex: (?!xtesting-pi)^xtesting-[a-z-0-9.]+-trivy$