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 *latest|*leguer|*kali|*jerma)
155 sudo docker build $build_arg \
156 --pull=false --no-cache --force-rm=true \
163 url: 'https://gerrit.opnfv.org/gerrit/functest-xtesting'
164 refspec: '+refs/heads/*:refs/remotes/origin/* +refs/changes/*:refs/changes/*'
169 name: 'xtesting-{repo}-{container}-{tag}-pull'
174 - xtesting-pull-containers:
175 <<: *xtesting-containers
178 name: 'xtesting-opnfv-xtesting-pull'
180 container: 'xtesting'
182 - 'xtesting-{repo}-{container}-{tag}-pull'
185 name: 'xtesting-opnfv-xtesting-mts-pull'
187 container: 'xtesting-mts'
192 - 'xtesting-{repo}-{container}-{tag}-pull'
195 name: 'xtesting-{repo}-{container}-{tag}-rmi'
200 - xtesting-remove-images:
201 <<: *xtesting-containers
204 name: 'xtesting-opnfv-xtesting-rmi'
206 container: 'xtesting'
208 - 'xtesting-{repo}-{container}-{tag}-rmi'
211 name: 'xtesting-opnfv-xtesting-mts-rmi'
213 container: 'xtesting-mts'
218 - 'xtesting-{repo}-{container}-{tag}-rmi'
221 name: 'xtesting-{repo}-{container}-{tag}-{test}-run'
225 - xtesting-build_tag:
230 - xtesting-run-containers:
231 <<: *xtesting-run-containers
234 name: 'xtesting-opnfv-xtesting'
236 container: 'xtesting'
247 - {'tag': 'hunter', 'test': 'sixth'}
248 - {'tag': 'iruya', 'test': 'sixth'}
250 - 'xtesting-{repo}-{container}-{tag}-{test}-run'
253 name: 'xtesting-opnfv-xtesting-mts'
255 container: 'xtesting-mts'
261 - {'tag': 'hunter', 'test': 'seventh'}
262 - {'tag': 'iruya', 'test': 'seventh'}
264 - 'xtesting-{repo}-{container}-{tag}-{test}-run'
272 if [ "{repo}" = "_" ]; then
273 image={container}:{tag}
274 elif [ "{port}" = "None" ]; then
275 image={repo}/{container}:{tag}
277 image={repo}:{port}/{container}:{tag}
279 sudo docker run --rm \
280 -e S3_ENDPOINT_URL=https://storage.googleapis.com \
281 -e S3_DST_URL=s3://artifacts.opnfv.org/xtesting \
282 -e HTTP_DST_URL=http://artifacts.opnfv.org/xtesting \
283 -v /home/opnfv/xtesting/.boto:/root/.boto \
284 -e TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results \
285 -e TEST_DB_EXT_URL=http://testresults.opnfv.org/test/api/v1/results \
286 -e BUILD_TAG=$BUILD_TAG \
287 -v $WORKSPACE/../$JOB_NAME/results:/var/lib/xtesting/results \
292 name: 'xtesting-{tag}-zip'
296 - xtesting-build_tag:
302 <<: *xtesting-containers
305 name: 'xtesting-{tag}-zip'
307 container: 'xtesting'
309 - 'xtesting-{tag}-zip'
312 name: 'xtesting-{tag}-daily'
313 project-type: multijob
319 - xtesting-build_tag:
325 use-build-blocker: true
326 blocking-level: 'NODE'
328 - '^xtesting-{tag}-(daily|review)$'
331 name: remove former images
333 - name: 'xtesting-opnfv-xtesting-{tag}-rmi'
335 - name: 'xtesting-opnfv-xtesting-mts-{tag}-rmi'
338 name: pull containers
340 - name: 'xtesting-opnfv-xtesting-{tag}-pull'
342 - name: 'xtesting-opnfv-xtesting-mts-{tag}-pull'
345 name: opnfv/xtesting:{tag}
347 - name: 'xtesting-opnfv-xtesting-{tag}-first-run'
349 - name: 'xtesting-opnfv-xtesting-{tag}-second-run'
351 - name: 'xtesting-opnfv-xtesting-{tag}-third-run'
353 - name: 'xtesting-opnfv-xtesting-{tag}-fourth-run'
355 - name: 'xtesting-opnfv-xtesting-{tag}-fifth-run'
357 - name: 'xtesting-opnfv-xtesting-{tag}-sixth-run'
360 name: opnfv/xtesting-mts:{tag}
362 - name: 'xtesting-opnfv-xtesting-mts-{tag}-seventh-run'
365 name: dump all campaign data
367 - name: 'xtesting-{tag}-zip'
370 - xtesting-dep: &xtesting-dep
371 name: 'xtesting-containers'
375 dependency: '{dependency}'
378 name: xtesting-pull-dep-images
382 if [ "_" = "_" ]; then
383 image=alpine:{dependency}
384 elif [ "_" = "None" ]; then
385 image=_/alpine:{dependency}
387 image=_:/alpine{dependency}
389 sudo docker pull $image || true
392 name: xtesting-remove-dep-images
396 if [ "_" = "_" ]; then
397 image=alpine:{dependency}
398 elif [ "_" = "None" ]; then
399 image=_/alpine:{dependency}
401 image=_:/alpine{dependency}
403 sudo docker rmi $image || true
406 name: 'xtesting-{repo}-{tag}-dep-pull'
411 - xtesting-pull-dep-images:
415 name: 'xtesting-{repo}-{tag}-dep-pull'
418 - 'xtesting-{repo}-{tag}-dep-pull'
421 name: 'xtesting-{repo}-{tag}-dep-rmi'
426 - xtesting-remove-dep-images:
430 name: 'xtesting-{repo}-{tag}-dep-rmi'
433 - 'xtesting-{repo}-{tag}-dep-rmi'
441 name: 'xtesting-{tag}-tox'
446 - xtesting-patchset-created:
458 - 'xtesting-{tag}-tox'
461 name: xtesting-opnfv-xtesting-{tag}-gate
467 - 'xtesting-{repo}-{container}-{tag}-gate'
470 name: xtesting-opnfv-xtesting-mts-{tag}-gate
472 container: xtesting-mts
479 - 'xtesting-{repo}-{container}-{tag}-gate'
483 name: 'xtesting-{repo}-{container}-{tag}-gate'
491 - xtesting-build-containers:
492 <<: *xtesting-build-containers
496 name: xtesting-patchset-created
500 - patchset-created-event
501 - comment-added-contains-event:
502 comment-contains-value: 'recheck'
503 - comment-added-contains-event:
504 comment-contains-value: 'reverify'
506 - project-compare-type: 'ANT'
507 project-pattern: 'functest-xtesting'
509 - branch-compare-type: 'ANT'
510 branch-pattern: '**/{branch}'
513 name: 'xtesting-{tag}-review'
514 project-type: multijob
516 - xtesting-patchset-created:
521 - xtesting-build_tag:
527 use-build-blocker: true
528 blocking-level: 'NODE'
530 - '^xtesting-{tag}-(daily|review)$'
533 name: remove former images
535 - name: 'xtesting-opnfv-xtesting-{tag}-rmi'
537 - name: 'xtesting-opnfv-xtesting-mts-{tag}-rmi'
540 name: remove dependency
542 - name: 'xtesting-{repo}-{tag}-dep-rmi'
545 name: pull dependency
547 - name: 'xtesting-{repo}-{tag}-dep-pull'
552 - name: 'xtesting-opnfv-xtesting-{tag}-gate'
555 name: opnfv/xtesting-mts
557 - name: 'xtesting-opnfv-xtesting-mts-{tag}-gate'
560 name: opnfv/xtesting:{tag}
562 - name: 'xtesting-opnfv-xtesting-{tag}-first-run'
564 - name: 'xtesting-opnfv-xtesting-{tag}-second-run'
566 - name: 'xtesting-opnfv-xtesting-{tag}-third-run'
568 - name: 'xtesting-opnfv-xtesting-{tag}-fourth-run'
570 - name: 'xtesting-opnfv-xtesting-{tag}-fifth-run'
572 - name: 'xtesting-opnfv-xtesting-{tag}-sixth-run'
575 name: opnfv/xtesting-mts:{tag}
577 - name: 'xtesting-opnfv-xtesting-mts-{tag}-seventh-run'
581 name: xtesting-commit
586 name: 'xtesting-{repo}-{container}-{tag}-build'
594 - xtesting-build-containers:
595 <<: *xtesting-build-containers
599 name: xtesting-opnfv-xtesting-{tag}-build
605 - 'xtesting-{repo}-{container}-{tag}-build'
608 name: xtesting-opnfv-xtesting-mts-{tag}-build
610 container: xtesting-mts
617 - 'xtesting-{repo}-{container}-{tag}-build'
621 name: 'xtesting-{tag}-docker'
622 project-type: multijob
635 name: remove dependency
637 - name: 'xtesting-{repo}-{tag}-dep-rmi'
640 name: pull dependency
642 - name: 'xtesting-{repo}-{tag}-dep-pull'
647 - name: 'xtesting-opnfv-xtesting-{tag}-build'
650 name: opnfv/xtesting-mts
652 - name: 'xtesting-opnfv-xtesting-mts-{tag}-build'
659 curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sudo sh -s -- -b .
660 if [ "{repo}" = "_" ]; then
661 image={container}:{tag}
662 elif [ "{port}" = "None" ]; then
663 image={repo}/{container}:{tag}
665 image={repo}:{port}/{container}:{tag}
667 ./trivy --exit-code 1 $image
670 name: 'xtesting-{repo}-{container}-{tag}-trivy'
676 <<: *xtesting-containers
679 name: 'xtesting-opnfv-xtesting-trivy'
681 container: 'xtesting'
683 - 'xtesting-{repo}-{container}-{tag}-trivy'
686 name: 'xtesting-opnfv-xtesting-mts-trivy'
688 container: 'xtesting-mts'
693 - 'xtesting-{repo}-{container}-{tag}-trivy'
699 - 'xtesting-{tag}-daily'
700 - 'xtesting-{tag}-review'
701 - 'xtesting-{tag}-docker'
714 regex: ^xtesting-[a-z-]+-daily$
717 name: xtesting-review
726 regex: ^xtesting-[a-z-]+-review$
738 regex: ^xtesting-[a-z-]+-tox$
741 name: xtesting-docker
750 regex: ^xtesting-[a-z-]+-docker$
762 regex: ^xtesting-[a-z-]+-trivy$