Remove Xtesting MTS in gates
[releng.git] / jjb / functest / xtesting.yaml
1 ---
2 - xtesting-containers: &xtesting-containers
3     name: 'xtesting-containers'
4     repo: '{repo}'
5     port: '{port}'
6     container: '{container}'
7     tag: '{tag}'
8
9 - xtesting-params: &xtesting-params
10     name: 'xtesting-params'
11     repo: 'opnfv'
12     port:
13     tag:
14       - latest:
15           from:
16           build_args:
17           branch: master
18           node: xtesting
19           dependency: 3.16
20       - zed:
21           from:
22           build_args:
23           branch: stable/zed
24           node: xtesting
25           dependency: 3.16
26       - yoga:
27           from:
28           build_args:
29           branch: stable/yoga
30           node: xtesting
31           dependency: 3.16
32       - xena:
33           from:
34           build_args:
35           branch: stable/xena
36           node: xtesting
37           dependency: 3.14
38       - wallaby:
39           from:
40           build_args:
41           branch: stable/wallaby
42           node: xtesting
43           dependency: 3.13
44
45 - xtesting-jobs: &xtesting-jobs
46     name: 'xtesting-jobs'
47     current-parameters: true
48
49 - parameter:
50     name: xtesting-node
51     parameters:
52       - label:
53           name: node
54           default: '{node}'
55
56 - parameter:
57     name: xtesting-build_tag
58     parameters:
59       - random-string:
60           name: build_tag
61
62 - xtesting-run-containers: &xtesting-run-containers
63     name: 'xtesting-run-containers'
64     <<: *xtesting-containers
65     test: '{test}'
66     privileged: '{privileged}'
67     volumes: '{volumes}'
68     env: '{env}'
69     network: '{network}'
70     uid: '{uid}'
71     gid: '{gid}'
72     published_ports: '{published_ports}'
73
74 - builder:
75     name: xtesting-pull-containers
76     builders:
77       - shell: |
78           set +x
79           if [ "{repo}" = "_" ]; then
80             image={container}:{tag}
81           elif [ "{port}" = "None" ]; then
82             image={repo}/{container}:{tag}
83           else
84             image={repo}:{port}/{container}:{tag}
85           fi
86           sudo docker pull $image
87
88 - builder:
89     name: xtesting-run-containers
90     builders:
91       - shell: |
92           set +x
93           volumes=;
94           if [ "{volumes}" != "None" ]; then
95             for i in $(echo {volumes} | tr -d '[]' |sed "s/, / /g" ); \
96               do volumes="-v $i $volumes"; done
97           fi
98           env=;
99           if [ "{env}" != "None" ]; then
100             for i in $(eval echo {env} | tr -d '[]' |sed "s/, / /g" ); \
101               do env="-e $i $env"; done
102           fi
103           published_ports=;
104           if [ "{published_ports}" != "None" ]; then
105             for i in $(echo {published_ports} | tr -d '[]' |sed "s/, / /g" ); \
106               do published_ports="-p $i $published_ports"; done
107           fi
108           [ ! -z "$WORKSPACE" ] && sudo rm -rf $WORKSPACE/results || true
109           if [ "{repo}" = "_" ]; then
110             image={container}:{tag}
111           elif [ "{port}" = "None" ]; then
112             image={repo}/{container}:{tag}
113           else
114             image={repo}:{port}/{container}:{tag}
115           fi
116           sudo mkdir -p $WORKSPACE/results
117           sudo chown {uid}:{gid} $WORKSPACE/results
118           sudo docker run --rm \
119             --privileged={privileged} \
120             --network={network} \
121             $volumes \
122             $env \
123             $published_ports \
124             -e S3_ENDPOINT_URL=https://storage.googleapis.com \
125             -e S3_DST_URL=s3://artifacts.opnfv.org/xtesting/$BUILD_TAG/$JOB_NAME-$BUILD_ID \
126             -e HTTP_DST_URL=http://artifacts.opnfv.org/xtesting/$BUILD_TAG/$JOB_NAME-$BUILD_ID \
127             -v /home/opnfv/xtesting/.boto:/etc/boto.cfg \
128             -e TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results \
129             -e TEST_DB_EXT_URL=http://testresults.opnfv.org/test/api/v1/results \
130             -e NODE_NAME=$node \
131             -e BUILD_TAG=$BUILD_TAG \
132             -v $WORKSPACE/../$JOB_NAME/results:/var/lib/xtesting/results \
133             $image run_tests -t {test} -p -r
134
135 - builder:
136     name: xtesting-remove-images
137     builders:
138       - shell: |
139           set +x
140           if [ "{repo}" = "_" ]; then
141             image={container}:{tag}
142           elif [ "{port}" = "None" ]; then
143             image={repo}/{container}:{tag}
144           else
145             image={repo}:{port}/{container}:{tag}
146           fi
147           sudo docker rmi $image || true
148
149 - job-template:
150     name: 'xtesting-{repo}-{container}-{tag}-pull'
151     parameters:
152       - xtesting-node:
153           node: '{node}'
154     builders:
155       - xtesting-pull-containers:
156           <<: *xtesting-containers
157
158 - project:
159     name: 'xtesting-opnfv-xtesting-pull'
160     <<: *xtesting-params
161     container: 'xtesting'
162     jobs:
163       - 'xtesting-{repo}-{container}-{tag}-pull'
164
165 - job-template:
166     name: 'xtesting-{repo}-{container}-{tag}-rmi'
167     parameters:
168       - xtesting-node:
169           node: '{node}'
170     builders:
171       - xtesting-remove-images:
172           <<: *xtesting-containers
173
174 - project:
175     name: 'xtesting-opnfv-xtesting-rmi'
176     <<: *xtesting-params
177     container: 'xtesting'
178     jobs:
179       - 'xtesting-{repo}-{container}-{tag}-rmi'
180
181 - job-template:
182     name: 'xtesting-opnfv-xtesting-{tag}-{test}-run'
183     parameters:
184       - xtesting-node:
185           node: '{node}'
186       - xtesting-build_tag:
187           build_tag: ''
188     builders:
189       - xtesting-run-containers:
190           <<: *xtesting-run-containers
191
192 - project:
193     name: 'xtesting-opnfv-xtesting'
194     <<: *xtesting-params
195     volumes:
196     env:
197     published_ports:
198     container: 'xtesting'
199     test:
200       - first
201       - second
202       - third
203       - fourth
204       - fifth
205       - sixth
206       - eighth
207       - nineth
208     privileged: 'false'
209     network: bridge
210     uid: 1000
211     gid: 1000
212     exclude:
213       - tag: wallaby
214         test: nineth
215       - tag: xena
216         test: nineth
217     jobs:
218       - 'xtesting-opnfv-xtesting-{tag}-{test}-run'
219
220 - builder:
221     name: xtesting-zip
222     builders:
223       - shell: |
224           set +x
225           volumes=;
226           if [ "{volumes}" != "None" ]; then
227             for i in $(echo {volumes} | tr -d '[]' |sed "s/, / /g" ); \
228               do volumes="-v $i $volumes"; done
229           fi
230           env=;
231           if [ "{env}" != "None" ]; then
232             for i in $(eval echo {env} | tr -d '[]' |sed "s/, / /g" ); \
233               do env="-e $i $env"; done
234           fi
235           published_ports=;
236           if [ "{published_ports}" != "None" ]; then
237             for i in $(echo {published_ports} | tr -d '[]' |sed "s/, / /g" ); \
238               do published_ports="-p $i $published_ports"; done
239           fi
240           [ ! -z "$WORKSPACE" ] && sudo rm -rf $WORKSPACE/results || true
241           if [ "{repo}" = "_" ]; then
242             image={container}:{tag}
243           elif [ "{port}" = "None" ]; then
244             image={repo}/{container}:{tag}
245           else
246             image={repo}:{port}/{container}:{tag}
247           fi
248           sudo mkdir -p $WORKSPACE/results
249           sudo chown {uid}:{gid} $WORKSPACE/results
250           sudo docker run --rm \
251             $volumes \
252             $env \
253             $published_ports \
254             -e S3_ENDPOINT_URL=https://storage.googleapis.com \
255             -e S3_DST_URL=s3://artifacts.opnfv.org/xtesting \
256             -e HTTP_DST_URL=http://artifacts.opnfv.org/xtesting \
257             -v /home/opnfv/xtesting/.boto:/etc/boto.cfg \
258             -e TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results \
259             -e TEST_DB_EXT_URL=http://testresults.opnfv.org/test/api/v1/results \
260             -e BUILD_TAG=$BUILD_TAG \
261             -v $WORKSPACE/../$JOB_NAME/results:/var/lib/xtesting/results \
262             $image zip_campaign
263
264 - job-template:
265     name: 'xtesting-{tag}-zip'
266     parameters:
267       - xtesting-node:
268           node: '{node}'
269       - xtesting-build_tag:
270           build_tag: ''
271     builders:
272       - xtesting-zip:
273           <<: *xtesting-containers
274           volumes: '{volumes}'
275           env: '{env}'
276           uid: '{uid}'
277           gid: '{gid}'
278           published_ports: '{published_ports}'
279
280 - project:
281     name: 'xtesting-{tag}-zip'
282     <<: *xtesting-params
283     volumes:
284     env:
285     published_ports:
286     container: 'xtesting'
287     uid: 1000
288     gid: 1000
289     jobs:
290       - 'xtesting-{tag}-zip'
291
292 - job-template:
293     name: 'xtesting-{tag}-daily'
294     project-type: multijob
295     triggers:
296       - timed: '@daily'
297     parameters:
298       - xtesting-node:
299           node: '{node}'
300       - xtesting-build_tag:
301           build_tag: ''
302     # PyYAML and yamllint differ here
303     # see https://github.com/yaml/pyyaml/issues/234
304     # yamllint disable rule:indentation
305     properties:
306       - build-blocker:
307           blocking-jobs:
308           - ^xtesting-(pi-)*{tag}-(daily|docker|review)$
309     # yamllint enable rule:indentation
310     builders:
311       - multijob:
312           name: remove former images
313           projects:
314             - name: 'xtesting-opnfv-xtesting-{tag}-rmi'
315               <<: *xtesting-jobs
316       - multijob:
317           name: pull containers
318           projects:
319             - name: 'xtesting-opnfv-xtesting-{tag}-pull'
320               <<: *xtesting-jobs
321       - multijob:
322           name: opnfv/xtesting:{tag}
323           projects:
324             - name: 'xtesting-opnfv-xtesting-{tag}-first-run'
325               <<: *xtesting-jobs
326             - name: 'xtesting-opnfv-xtesting-{tag}-second-run'
327               <<: *xtesting-jobs
328             - name: 'xtesting-opnfv-xtesting-{tag}-third-run'
329               <<: *xtesting-jobs
330             - name: 'xtesting-opnfv-xtesting-{tag}-fourth-run'
331               <<: *xtesting-jobs
332             - name: 'xtesting-opnfv-xtesting-{tag}-fifth-run'
333               <<: *xtesting-jobs
334             - name: 'xtesting-opnfv-xtesting-{tag}-sixth-run'
335               <<: *xtesting-jobs
336             - name: 'xtesting-opnfv-xtesting-{tag}-eighth-run'
337               <<: *xtesting-jobs
338             - name: 'xtesting-opnfv-xtesting-{tag}-nineth-run'
339               <<: *xtesting-jobs
340       - multijob:
341           name: dump all campaign data
342           projects:
343             - name: 'xtesting-{tag}-zip'
344               <<: *xtesting-jobs
345     publishers:
346       - email-ext:
347           failure: false
348           first-failure: true
349           fixed: true
350           recipients: cedric.ollivier@orange.com
351
352 - project:
353     name: 'xtesting-daily'
354     <<: *xtesting-params
355     jobs:
356       - 'xtesting-{tag}-daily'
357
358 - view:
359     name: xtesting
360     view-type: list
361     columns:
362       - status
363       - weather
364       - job
365       - last-success
366       - last-failure
367       - last-duration
368     regex: ^xtesting-[a-z0-9.]+-daily$
369
370 - xtesting-build-containers: &xtesting-build-containers
371     name: 'xtesting-build-containers'
372     <<: *xtesting-containers
373     ref_arg: '{ref_arg}'
374     path: '{path}'
375     build_args: '{build_args}'
376     from: '{from}'
377
378 - builder:
379     name: xtesting-build-containers
380     builders:
381       - shell: |
382           set +x
383           if [ "{repo}" = "_" ]; then
384             image={container}:{tag}
385           elif [ "{port}" = "None" ]; then
386             image={repo}/{container}:{tag}
387           else
388             image={repo}:{port}/{container}:{tag}
389           fi
390           build_args=""
391           if [ "{build_args}" != "None" ]; then
392             for i in $(echo {build_args} | tr -d '[]' |sed "s/, / /g" ); \
393               do build_args="--build-arg $i $build_args"; done
394           fi
395           if [ "{ref_arg}" != "None" ]; then
396             build_args="$build_args --build-arg {ref_arg}={ref}"
397           fi
398           cd {path}
399           if [ "{from}" != "None" ]; then
400               sed -i {from} Dockerfile
401           fi
402           sudo docker build $build_args \
403             --pull=false --no-cache --force-rm=true \
404             -t $image .
405
406 - scm:
407     name: xtesting-scm
408     scm:
409       - git:
410           url: 'https://gerrit.opnfv.org/gerrit/functest-xtesting'
411           refspec: '+refs/heads/*:refs/remotes/origin/* +refs/changes/*:refs/changes/*'
412           branches:
413             - '{ref}'
414
415 - xtesting-dep: &xtesting-dep
416     name: 'xtesting-containers'
417     repo: '{repo}'
418     port: '{port}'
419     tag: '{tag}'
420     dependency: '{dependency}'
421
422 - builder:
423     name: xtesting-pull-dep-images
424     builders:
425       - shell: |
426           set +x
427           if [ "_" = "_" ]; then
428             image=alpine:{dependency}
429           elif [ "" = "None" ]; then
430             image=_/alpine:{dependency}
431           else
432             image=_:/alpine:{dependency}
433           fi
434           sudo docker pull $image || true
435
436 - builder:
437     name: xtesting-remove-dep-images
438     builders:
439       - shell: |
440           set +x
441           if [ "_" = "_" ]; then
442             image=alpine:{dependency}
443           elif [ "" = "None" ]; then
444             image=_/alpine:{dependency}
445           else
446             image=_:/alpine:{dependency}
447           fi
448           sudo docker rmi $image || true
449
450 - job-template:
451     name: 'xtesting-{repo}-{tag}-dep-pull'
452     parameters:
453       - xtesting-node:
454           node: '{node}'
455     builders:
456       - xtesting-pull-dep-images:
457           <<: *xtesting-dep
458
459 - project:
460     name: 'xtesting-{repo}-{tag}-dep-pull'
461     <<: *xtesting-params
462     jobs:
463       - 'xtesting-{repo}-{tag}-dep-pull'
464
465 - job-template:
466     name: 'xtesting-{repo}-{tag}-dep-rmi'
467     parameters:
468       - xtesting-node:
469           node: '{node}'
470     builders:
471       - xtesting-remove-dep-images:
472           <<: *xtesting-dep
473
474 - project:
475     name: 'xtesting-{repo}-{tag}-dep-rmi'
476     <<: *xtesting-params
477     jobs:
478       - 'xtesting-{repo}-{tag}-dep-rmi'
479
480 - builder:
481     name: xtesting-tox
482     builders:
483       - shell: |
484           set +x
485           sudo apt-get -o DPkg::Lock::Timeout=300 update && \
486           sudo DEBIAN_FRONTEND=noninteractive apt-get \
487             -o DPkg::Lock::Timeout=300 dist-upgrade -y
488           sudo DEBIAN_FRONTEND=noninteractive \
489           apt-get -o DPkg::Lock::Timeout=300 install software-properties-common gpg -y
490           sudo add-apt-repository -y ppa:deadsnakes/ppa
491           sudo apt-get -o DPkg::Lock::Timeout=300 update && \
492           sudo DEBIAN_FRONTEND=noninteractive apt-get \
493             -o DPkg::Lock::Timeout=300 install \
494             libxml2-dev libxslt-dev libffi-dev libjpeg-dev \
495             python3.10 python3.10-dev python3.10-distutils \
496             python3.9 python3.9-dev python3.9-distutils \
497             python3.8 python3.8-dev python3.8-distutils \
498             python3-pip enchant-2 -y
499           sudo pip3 install tox tox-pip-version
500
501           tox
502
503 - job-template:
504     name: 'xtesting-{tag}-tox'
505     scm:
506       - xtesting-scm:
507           ref: $GERRIT_REFSPEC
508     triggers:
509       - xtesting-patchset-created:
510           branch: '{branch}'
511     parameters:
512       - xtesting-node:
513           node: '{node}'
514     builders:
515       - xtesting-tox:
516
517 - project:
518     name: xtesting-tox
519     <<: *xtesting-params
520     jobs:
521       - 'xtesting-{tag}-tox'
522
523 - job-template:
524     name: 'xtesting-{repo}-{container}-{tag}-gate'
525     parameters:
526       - xtesting-node:
527           node: '{node}'
528     scm:
529       - xtesting-scm:
530           ref: $GERRIT_REFSPEC
531     builders:
532       - xtesting-build-containers:
533           <<: *xtesting-build-containers
534           ref: $GERRIT_REFSPEC
535           build_args: '{build_args}'
536
537 - project:
538     name: xtesting-opnfv-xtesting-{tag}-gate
539     <<: *xtesting-params
540     container: xtesting
541     ref_arg: BRANCH
542     path: docker/core
543     jobs:
544       - 'xtesting-{repo}-{container}-{tag}-gate'
545
546 - trigger:
547     name: xtesting-patchset-created
548     triggers:
549       - gerrit:
550           trigger-on:
551             - patchset-created-event
552             - comment-added-contains-event:
553                 comment-contains-value: 'recheck'
554             - comment-added-contains-event:
555                 comment-contains-value: 'reverify'
556           projects:
557             - project-compare-type: 'ANT'
558               project-pattern: 'functest-xtesting'
559               branches:
560                 - branch-compare-type: 'ANT'
561                   branch-pattern: '**/{branch}'
562
563 - job-template:
564     name: 'xtesting-{tag}-review'
565     project-type: multijob
566     triggers:
567       - xtesting-patchset-created:
568           branch: '{branch}'
569     parameters:
570       - xtesting-node:
571           node: '{node}'
572       - xtesting-build_tag:
573           build_tag: ''
574     # PyYAML and yamllint differ here
575     # see https://github.com/yaml/pyyaml/issues/234
576     # yamllint disable rule:indentation
577     properties:
578       - build-blocker:
579           blocking-jobs:
580           - ^xtesting-(pi-)*{tag}-(daily|docker|review)$
581     # yamllint enable rule:indentation
582     builders:
583       - multijob:
584           name: remove former images
585           projects:
586             - name: 'xtesting-opnfv-xtesting-{tag}-rmi'
587               <<: *xtesting-jobs
588       - multijob:
589           name: remove dependency
590           projects:
591             - name: 'xtesting-{repo}-{tag}-dep-rmi'
592               <<: *xtesting-jobs
593       - multijob:
594           name: pull dependency
595           projects:
596             - name: 'xtesting-{repo}-{tag}-dep-pull'
597               <<: *xtesting-jobs
598       - multijob:
599           name: opnfv/xtesting
600           projects:
601             - name: 'xtesting-opnfv-xtesting-{tag}-gate'
602               <<: *xtesting-jobs
603       - multijob:
604           name: opnfv/xtesting:{tag}
605           projects:
606             - name: 'xtesting-opnfv-xtesting-{tag}-first-run'
607               <<: *xtesting-jobs
608             - name: 'xtesting-opnfv-xtesting-{tag}-second-run'
609               <<: *xtesting-jobs
610             - name: 'xtesting-opnfv-xtesting-{tag}-third-run'
611               <<: *xtesting-jobs
612             - name: 'xtesting-opnfv-xtesting-{tag}-fourth-run'
613               <<: *xtesting-jobs
614             - name: 'xtesting-opnfv-xtesting-{tag}-fifth-run'
615               <<: *xtesting-jobs
616             - name: 'xtesting-opnfv-xtesting-{tag}-sixth-run'
617               <<: *xtesting-jobs
618             - name: 'xtesting-opnfv-xtesting-{tag}-eighth-run'
619               <<: *xtesting-jobs
620             - name: 'xtesting-opnfv-xtesting-{tag}-nineth-run'
621               <<: *xtesting-jobs
622     publishers:
623       - email-ext:
624           failure: false
625           first-failure: true
626           fixed: true
627           recipients: cedric.ollivier@orange.com
628
629 - project:
630     name: 'xtesting-review'
631     <<: *xtesting-params
632     jobs:
633       - 'xtesting-{tag}-review'
634
635 - view:
636     name: xtesting-review
637     view-type: list
638     columns:
639       - status
640       - weather
641       - job
642       - last-success
643       - last-failure
644       - last-duration
645     regex: ^xtesting-[a-z0-9.]+-review$
646
647 - view:
648     name: xtesting-tox
649     view-type: list
650     columns:
651       - status
652       - weather
653       - job
654       - last-success
655       - last-failure
656       - last-duration
657     regex: ^xtesting-[a-z0-9.]+-tox$
658
659 - builder:
660     name: xtesting-push-containers
661     builders:
662       - shell: |
663           set +x
664           if [ "{repo}" = "_" ]; then
665             image={container}:{tag}
666           elif [ "{port}" = "None" ]; then
667             image={repo}/{container}:{tag}
668           else
669             image={repo}:{port}/{container}:{tag}
670           fi
671           sudo docker push $image
672
673 - trigger:
674     name: xtesting-commit
675     triggers:
676       - pollscm:
677           cron: "*/30 * * * *"
678
679 - job-template:
680     name: 'xtesting-{repo}-{container}-{tag}-build'
681     parameters:
682       - xtesting-node:
683           node: '{node}'
684     scm:
685       - xtesting-scm:
686           ref: '{branch}'
687     builders:
688       - xtesting-build-containers:
689           <<: *xtesting-build-containers
690           ref: '{branch}'
691           build_args: '{build_args}'
692       - xtesting-push-containers:
693           <<: *xtesting-build-containers
694           ref: '{branch}'
695
696 - project:
697     name: xtesting-opnfv-xtesting-{tag}-build
698     <<: *xtesting-params
699     container: xtesting
700     ref_arg: BRANCH
701     path: docker/core
702     jobs:
703       - 'xtesting-{repo}-{container}-{tag}-build'
704
705 - job-template:
706     name: 'xtesting-{tag}-docker'
707     project-type: multijob
708     triggers:
709       - xtesting-commit
710     scm:
711       - xtesting-scm:
712           ref: '{branch}'
713     parameters:
714       - xtesting-node:
715           node: '{node}'
716     # PyYAML and yamllint differ here
717     # see https://github.com/yaml/pyyaml/issues/234
718     # yamllint disable rule:indentation
719     properties:
720       - build-blocker:
721           blocking-jobs:
722           - ^xtesting-(pi-)*{tag}-(daily|docker|review)$
723     # yamllint enable rule:indentation
724     builders:
725       - multijob:
726           name: remove dependency
727           projects:
728             - name: 'xtesting-{repo}-{tag}-dep-rmi'
729               <<: *xtesting-jobs
730       - multijob:
731           name: pull dependency
732           projects:
733             - name: 'xtesting-{repo}-{tag}-dep-pull'
734               <<: *xtesting-jobs
735       - multijob:
736           name: opnfv/xtesting
737           projects:
738             - name: 'xtesting-opnfv-xtesting-{tag}-build'
739               <<: *xtesting-jobs
740     publishers:
741       - email-ext:
742           failure: false
743           first-failure: true
744           fixed: true
745           recipients: cedric.ollivier@orange.com
746
747 - builder:
748     name: xtesting-trivy
749     builders:
750       - shell: |
751           sudo apt-get -o DPkg::Lock::Timeout=300 update && \
752           sudo DEBIAN_FRONTEND=noninteractive apt-get \
753             -o DPkg::Lock::Timeout=300 install curl -y
754
755           curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sudo sh -s -- -b .
756           if [ "{repo}" = "_" ]; then
757             image={container}:{tag}
758           elif [ "{port}" = "None" ]; then
759             image={repo}/{container}:{tag}
760           else
761             image={repo}:{port}/{container}:{tag}
762           fi
763           ./trivy image --exit-code 1 $image
764
765 - job-template:
766     name: 'xtesting-{repo}-{container}-{tag}-trivy'
767     triggers:
768       - timed: '@daily'
769     parameters:
770       - xtesting-node:
771           node: '{node}'
772     builders:
773       - xtesting-trivy:
774           <<: *xtesting-containers
775     publishers:
776       - email-ext:
777           failure: false
778           first-failure: true
779           fixed: true
780           recipients: cedric.ollivier@orange.com
781
782 - project:
783     name: 'xtesting-opnfv-xtesting-trivy'
784     <<: *xtesting-params
785     container: 'xtesting'
786     jobs:
787       - 'xtesting-{repo}-{container}-{tag}-trivy'
788
789 - builder:
790     name: xtesting-grype
791     builders:
792       - shell: |
793           sudo apt-get -o DPkg::Lock::Timeout=300 update && \
794           sudo DEBIAN_FRONTEND=noninteractive apt-get \
795             -o DPkg::Lock::Timeout=300 install curl -y
796
797           curl -sSfL https://raw.githubusercontent.com/anchore/grype/main/install.sh | sudo sh -s -- -b .
798           if [ "{repo}" = "_" ]; then
799             image={container}:{tag}
800           elif [ "{port}" = "None" ]; then
801             image={repo}/{container}:{tag}
802           else
803             image={repo}:{port}/{container}:{tag}
804           fi
805           ./grype -q $image
806
807 - job-template:
808     name: 'xtesting-{repo}-{container}-{tag}-grype'
809     triggers:
810       - timed: '@daily'
811     parameters:
812       - xtesting-node:
813           node: '{node}'
814     builders:
815       - xtesting-grype:
816           <<: *xtesting-containers
817     publishers:
818       - email-ext:
819           failure: false
820           first-failure: true
821           fixed: true
822           recipients: cedric.ollivier@orange.com
823
824 - project:
825     name: 'xtesting-opnfv-xtesting-grype'
826     <<: *xtesting-params
827     container: 'xtesting'
828     jobs:
829       - 'xtesting-{repo}-{container}-{tag}-grype'
830
831 - project:
832     name: 'xtesting'
833     <<: *xtesting-params
834     jobs:
835       - 'xtesting-{tag}-docker'
836
837 - view:
838     name: xtesting-docker
839     view-type: list
840     columns:
841       - status
842       - weather
843       - job
844       - last-success
845       - last-failure
846       - last-duration
847     regex: ^xtesting-[a-z0-9.]+-docker$
848
849 - view:
850     name: xtesting-trivy
851     view-type: list
852     columns:
853       - status
854       - weather
855       - job
856       - last-success
857       - last-failure
858       - last-duration
859     regex: (?!xtesting-pi)^xtesting-[a-z-0-9.]+-trivy$
860
861 - view:
862     name: xtesting-grype
863     view-type: list
864     columns:
865       - status
866       - weather
867       - job
868       - last-success
869       - last-failure
870       - last-duration
871     regex: (?!xtesting-pi)^xtesting-[a-z-0-9.]+-grype$