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}"
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'
194 - 'xtesting-{repo}-{container}-{tag}-pull'
197 name: 'xtesting-{repo}-{container}-{tag}-rmi'
202 - xtesting-remove-images:
203 <<: *xtesting-containers
206 name: 'xtesting-opnfv-xtesting-rmi'
208 container: 'xtesting'
210 - 'xtesting-{repo}-{container}-{tag}-rmi'
213 name: 'xtesting-opnfv-xtesting-mts-rmi'
215 container: 'xtesting-mts'
222 - 'xtesting-{repo}-{container}-{tag}-rmi'
225 name: 'xtesting-{repo}-{container}-{tag}-{test}-run'
229 - xtesting-build_tag:
234 - xtesting-run-containers:
235 <<: *xtesting-run-containers
238 name: 'xtesting-opnfv-xtesting'
240 container: 'xtesting'
256 - 'xtesting-{repo}-{container}-{tag}-{test}-run'
259 name: 'xtesting-opnfv-xtesting-mts'
261 container: 'xtesting-mts'
276 - 'xtesting-{repo}-{container}-{tag}-{test}-run'
284 if [ "{repo}" = "_" ]; then
285 image={container}:{tag}
286 elif [ "{port}" = "None" ]; then
287 image={repo}/{container}:{tag}
289 image={repo}:{port}/{container}:{tag}
291 sudo docker run --rm \
292 -e S3_ENDPOINT_URL=https://storage.googleapis.com \
293 -e S3_DST_URL=s3://artifacts.opnfv.org/xtesting \
294 -e HTTP_DST_URL=http://artifacts.opnfv.org/xtesting \
295 -v /home/opnfv/xtesting/.boto:/root/.boto \
296 -e TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results \
297 -e TEST_DB_EXT_URL=http://testresults.opnfv.org/test/api/v1/results \
298 -e BUILD_TAG=$BUILD_TAG \
299 -v $WORKSPACE/../$JOB_NAME/results:/var/lib/xtesting/results \
304 name: 'xtesting-{tag}-zip'
308 - xtesting-build_tag:
314 <<: *xtesting-containers
317 name: 'xtesting-{tag}-zip'
319 container: 'xtesting'
321 - 'xtesting-{tag}-zip'
324 name: 'xtesting-{tag}-daily'
325 project-type: multijob
331 - xtesting-build_tag:
337 use-build-blocker: true
338 blocking-level: 'NODE'
340 - '^xtesting-{tag}-(daily|review)$'
343 name: remove former images
345 - name: 'xtesting-opnfv-xtesting-{tag}-rmi'
347 - name: 'xtesting-opnfv-xtesting-mts-{tag}-rmi'
350 name: pull containers
352 - name: 'xtesting-opnfv-xtesting-{tag}-pull'
354 - name: 'xtesting-opnfv-xtesting-mts-{tag}-pull'
357 name: opnfv/xtesting:{tag}
359 - name: 'xtesting-opnfv-xtesting-{tag}-first-run'
361 - name: 'xtesting-opnfv-xtesting-{tag}-second-run'
363 - name: 'xtesting-opnfv-xtesting-{tag}-third-run'
365 - name: 'xtesting-opnfv-xtesting-{tag}-fourth-run'
367 - name: 'xtesting-opnfv-xtesting-{tag}-fifth-run'
369 - name: 'xtesting-opnfv-xtesting-{tag}-sixth-run'
372 name: opnfv/xtesting-mts:{tag}
374 - name: 'xtesting-opnfv-xtesting-mts-{tag}-seventh-run'
377 name: dump all campaign data
379 - name: 'xtesting-{tag}-zip'
382 - xtesting-dep: &xtesting-dep
383 name: 'xtesting-containers'
387 dependency: '{dependency}'
390 name: xtesting-pull-dep-images
394 if [ "_" = "_" ]; then
395 image=alpine:{dependency}
396 elif [ "_" = "None" ]; then
397 image=_/alpine:{dependency}
399 image=_:/alpine{dependency}
401 sudo docker pull $image || true
404 name: xtesting-remove-dep-images
408 if [ "_" = "_" ]; then
409 image=alpine:{dependency}
410 elif [ "_" = "None" ]; then
411 image=_/alpine:{dependency}
413 image=_:/alpine{dependency}
415 sudo docker rmi $image || true
418 name: 'xtesting-{repo}-{tag}-dep-pull'
423 - xtesting-pull-dep-images:
427 name: 'xtesting-{repo}-{tag}-dep-pull'
430 - 'xtesting-{repo}-{tag}-dep-pull'
433 name: 'xtesting-{repo}-{tag}-dep-rmi'
438 - xtesting-remove-dep-images:
442 name: 'xtesting-{repo}-{tag}-dep-rmi'
445 - 'xtesting-{repo}-{tag}-dep-rmi'
453 name: 'xtesting-{tag}-tox'
458 - xtesting-patchset-created:
470 - 'xtesting-{tag}-tox'
473 name: xtesting-opnfv-xtesting-{tag}-gate
479 - 'xtesting-{repo}-{container}-{tag}-gate'
482 name: xtesting-opnfv-xtesting-mts-{tag}-gate
484 container: xtesting-mts
493 - 'xtesting-{repo}-{container}-{tag}-gate'
497 name: 'xtesting-{repo}-{container}-{tag}-gate'
505 - xtesting-build-containers:
506 <<: *xtesting-build-containers
510 name: xtesting-patchset-created
514 - patchset-created-event
515 - comment-added-contains-event:
516 comment-contains-value: 'recheck'
517 - comment-added-contains-event:
518 comment-contains-value: 'reverify'
520 - project-compare-type: 'ANT'
521 project-pattern: 'functest-xtesting'
523 - branch-compare-type: 'ANT'
524 branch-pattern: '**/{branch}'
527 name: 'xtesting-{tag}-review'
528 project-type: multijob
530 - xtesting-patchset-created:
535 - xtesting-build_tag:
541 use-build-blocker: true
542 blocking-level: 'NODE'
544 - '^xtesting-{tag}-(daily|review)$'
547 name: remove former images
549 - name: 'xtesting-opnfv-xtesting-{tag}-rmi'
551 - name: 'xtesting-opnfv-xtesting-mts-{tag}-rmi'
554 name: remove dependency
556 - name: 'xtesting-{repo}-{tag}-dep-rmi'
559 name: pull dependency
561 - name: 'xtesting-{repo}-{tag}-dep-pull'
566 - name: 'xtesting-opnfv-xtesting-{tag}-gate'
569 name: opnfv/xtesting-mts
571 - name: 'xtesting-opnfv-xtesting-mts-{tag}-gate'
574 name: opnfv/xtesting:{tag}
576 - name: 'xtesting-opnfv-xtesting-{tag}-first-run'
578 - name: 'xtesting-opnfv-xtesting-{tag}-second-run'
580 - name: 'xtesting-opnfv-xtesting-{tag}-third-run'
582 - name: 'xtesting-opnfv-xtesting-{tag}-fourth-run'
584 - name: 'xtesting-opnfv-xtesting-{tag}-fifth-run'
586 - name: 'xtesting-opnfv-xtesting-{tag}-sixth-run'
589 name: opnfv/xtesting-mts:{tag}
591 - name: 'xtesting-opnfv-xtesting-mts-{tag}-seventh-run'
595 name: xtesting-commit
600 name: 'xtesting-{repo}-{container}-{tag}-build'
608 - xtesting-build-containers:
609 <<: *xtesting-build-containers
613 name: xtesting-opnfv-xtesting-{tag}-build
619 - 'xtesting-{repo}-{container}-{tag}-build'
622 name: xtesting-opnfv-xtesting-mts-{tag}-build
624 container: xtesting-mts
633 - 'xtesting-{repo}-{container}-{tag}-build'
637 name: 'xtesting-{tag}-docker'
638 project-type: multijob
651 name: remove dependency
653 - name: 'xtesting-{repo}-{tag}-dep-rmi'
656 name: pull dependency
658 - name: 'xtesting-{repo}-{tag}-dep-pull'
663 - name: 'xtesting-opnfv-xtesting-{tag}-build'
666 name: opnfv/xtesting-mts
668 - name: 'xtesting-opnfv-xtesting-mts-{tag}-build'
675 curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sudo sh -s -- -b .
676 if [ "{repo}" = "_" ]; then
677 image={container}:{tag}
678 elif [ "{port}" = "None" ]; then
679 image={repo}/{container}:{tag}
681 image={repo}:{port}/{container}:{tag}
683 ./trivy --exit-code 1 $image
686 name: 'xtesting-{repo}-{container}-{tag}-trivy'
692 <<: *xtesting-containers
695 name: 'xtesting-opnfv-xtesting-trivy'
697 container: 'xtesting'
699 - 'xtesting-{repo}-{container}-{tag}-trivy'
701 name: 'xtesting-opnfv-xtesting-mts-trivy'
703 container: 'xtesting-mts'
710 - 'xtesting-{repo}-{container}-{tag}-trivy'
716 - 'xtesting-{tag}-daily'
717 - 'xtesting-{tag}-review'
718 - 'xtesting-{tag}-docker'
731 regex: ^xtesting-[a-z-]+-daily$
734 name: xtesting-review
743 regex: ^xtesting-[a-z-]+-review$
755 regex: ^xtesting-[a-z-]+-tox$
758 name: xtesting-docker
767 regex: ^xtesting-[a-z-]+-docker$
779 regex: ^xtesting-[a-z-]+-trivy$