Merge "Configure email publishers in Functest jobs"
[releng.git] / jjb / functest / functest.yaml
1 ---
2 - functest-containers: &functest-containers
3     name: 'functest-containers'
4     repo: '{repo}'
5     port: '{port}'
6     container: '{container}'
7     tag: '{tag}'
8
9 - functest-params: &functest-params
10     name: 'functest-params'
11     repo: 'opnfv'
12     port:
13     tag:
14       - latest:
15           from:
16           build_args:
17           branch: master
18           slave: lf-pod4-2
19           DASHBOARD_URL: http://172.30.12.85
20           dependency: 3.14
21       - xena:
22           from:
23           build_args:
24           branch: stable/xena
25           slave: lf-pod4-2
26           DASHBOARD_URL: http://172.30.12.85
27           dependency: 3.14
28       - wallaby:
29           from:
30           build_args:
31           branch: stable/wallaby
32           slave: lf-virtual6
33           DASHBOARD_URL: http://172.30.13.91
34           dependency: 3.13
35       - leguer:
36           from:
37           build_args:
38           branch: stable/leguer
39           slave: lf-virtual9
40           DASHBOARD_URL: http://172.30.13.94
41           dependency: 3.12
42       - kali:
43           from:
44           build_args:
45           branch: stable/kali
46           slave: lf-pod4-3
47           DASHBOARD_URL: http://172.30.12.88
48           dependency: 3.11
49       - jerma:
50           from:
51           build_args:
52           branch: stable/jerma
53           slave: lf-pod4
54           DASHBOARD_URL: http://172.30.12.83
55           dependency: 3.10
56
57 - functest-jobs: &functest-jobs
58     name: 'functest-jobs'
59     current-parameters: true
60
61 - parameter:
62     name: functest-slave
63     parameters:
64       - label:
65           name: slave
66           default: '{slave}'
67
68 - parameter:
69     name: functest-build_tag
70     parameters:
71       - random-string:
72           name: build_tag
73
74 - parameter:
75     name: functest-EXTERNAL_NETWORK
76     parameters:
77       - string:
78           name: EXTERNAL_NETWORK
79           default: public
80
81 - parameter:
82     name: functest-VOLUME_DEVICE_NAME
83     parameters:
84       - string:
85           name: VOLUME_DEVICE_NAME
86           default: sdb
87
88 - parameter:
89     name: functest-IMAGE_PROPERTIES
90     parameters:
91       - string:
92           name: IMAGE_PROPERTIES
93           default: hw_scsi_model:virtio-scsi,hw_disk_bus:scsi
94
95 - functest-run-containers: &functest-run-containers
96     name: 'functest-run-containers'
97     <<: *functest-containers
98     test: '{test}'
99     privileged: '{privileged}'
100     volumes: '{volumes}'
101     env: '{env}'
102     network: '{network}'
103     DASHBOARD_URL: '{DASHBOARD_URL}'
104
105 - builder:
106     name: functest-pull-containers
107     builders:
108       - shell: |
109           set +x
110           if [ "{repo}" = "_" ]; then
111             image={container}:{tag}
112           elif [ "{port}" = "None" ]; then
113             image={repo}/{container}:{tag}
114           else
115             image={repo}:{port}/{container}:{tag}
116           fi
117           sudo docker pull $image
118
119 - builder:
120     name: functest-run-containers
121     builders:
122       - shell: |
123           set +x
124           volumes=;
125           if [ "{volumes}" != "None" ]; then
126             for i in $(echo {volumes} | tr -d '[]' |sed "s/, / /g" ); \
127               do volumes="-v $i $volumes"; done
128           fi
129           env=;
130           if [ "{env}" != "None" ]; then
131             for i in $(eval echo {env} | tr -d '[]' |sed "s/, / /g" ); \
132               do env="-e $i $env"; done
133           fi
134           [ ! -z "$WORKSPACE" ] && sudo rm -rf $WORKSPACE/results || true
135           if [ "{repo}" = "_" ]; then
136             image={container}:{tag}
137           elif [ "{port}" = "None" ]; then
138             image={repo}/{container}:{tag}
139           else
140             image={repo}:{port}/{container}:{tag}
141           fi
142           sudo docker run --rm \
143             --privileged={privileged} \
144             --network={network} \
145             $volumes \
146             $env \
147             -e S3_ENDPOINT_URL=https://storage.googleapis.com \
148             -e S3_DST_URL=s3://artifacts.opnfv.org/functest/$BUILD_TAG/$JOB_NAME-$BUILD_ID \
149             -e HTTP_DST_URL=http://artifacts.opnfv.org/functest/$BUILD_TAG/$JOB_NAME-$BUILD_ID \
150             -v /home/opnfv/functest/.boto:/root/.boto \
151             -e TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results \
152             -e TEST_DB_EXT_URL=http://testresults.opnfv.org/test/api/v1/results \
153             -e NODE_NAME=$slave \
154             -e BUILD_TAG=$BUILD_TAG \
155             -v $WORKSPACE/../$JOB_NAME/results:/var/lib/xtesting/results \
156             -e DASHBOARD_URL={DASHBOARD_URL} \
157             $image run_tests -t {test} -p -r
158
159 - builder:
160     name: functest-remove-images
161     builders:
162       - shell: |
163           set +x
164           if [ "{repo}" = "_" ]; then
165             image={container}:{tag}
166           elif [ "{port}" = "None" ]; then
167             image={repo}/{container}:{tag}
168           else
169             image={repo}:{port}/{container}:{tag}
170           fi
171           sudo docker rmi $image || true
172
173 - job-template:
174     name: 'functest-{repo}-{container}-{tag}-pull'
175     parameters:
176       - functest-slave:
177           slave: '{slave}'
178     builders:
179       - functest-pull-containers:
180           <<: *functest-containers
181
182 - project:
183     name: 'functest-opnfv-functest-healthcheck-pull'
184     <<: *functest-params
185     container: 'functest-healthcheck'
186     jobs:
187       - 'functest-{repo}-{container}-{tag}-pull'
188
189 - project:
190     name: 'functest-opnfv-functest-smoke-pull'
191     <<: *functest-params
192     container: 'functest-smoke'
193     jobs:
194       - 'functest-{repo}-{container}-{tag}-pull'
195
196 - project:
197     name: 'functest-opnfv-functest-smoke-cntt-pull'
198     <<: *functest-params
199     container: 'functest-smoke-cntt'
200     jobs:
201       - 'functest-{repo}-{container}-{tag}-pull'
202
203 - project:
204     name: 'functest-opnfv-functest-benchmarking-pull'
205     <<: *functest-params
206     container: 'functest-benchmarking'
207     jobs:
208       - 'functest-{repo}-{container}-{tag}-pull'
209
210 - project:
211     name: 'functest-opnfv-functest-benchmarking-cntt-pull'
212     <<: *functest-params
213     container: 'functest-benchmarking-cntt'
214     jobs:
215       - 'functest-{repo}-{container}-{tag}-pull'
216
217 - project:
218     name: 'functest-opnfv-functest-vnf-pull'
219     <<: *functest-params
220     container: 'functest-vnf'
221     jobs:
222       - 'functest-{repo}-{container}-{tag}-pull'
223
224 - job-template:
225     name: 'functest-{repo}-{container}-{tag}-rmi'
226     parameters:
227       - functest-slave:
228           slave: '{slave}'
229     builders:
230       - functest-remove-images:
231           <<: *functest-containers
232
233 - project:
234     name: 'functest-opnfv-functest-healthcheck-rmi'
235     <<: *functest-params
236     container: 'functest-healthcheck'
237     jobs:
238       - 'functest-{repo}-{container}-{tag}-rmi'
239
240 - project:
241     name: 'functest-opnfv-functest-smoke-rmi'
242     <<: *functest-params
243     container: 'functest-smoke'
244     jobs:
245       - 'functest-{repo}-{container}-{tag}-rmi'
246
247 - project:
248     name: 'functest-opnfv-functest-smoke-cntt-rmi'
249     <<: *functest-params
250     container: 'functest-smoke-cntt'
251     jobs:
252       - 'functest-{repo}-{container}-{tag}-rmi'
253
254 - project:
255     name: 'functest-opnfv-functest-benchmarking-rmi'
256     <<: *functest-params
257     container: 'functest-benchmarking'
258     jobs:
259       - 'functest-{repo}-{container}-{tag}-rmi'
260
261 - project:
262     name: 'functest-opnfv-functest-benchmarking-cntt-rmi'
263     <<: *functest-params
264     container: 'functest-benchmarking-cntt'
265     jobs:
266       - 'functest-{repo}-{container}-{tag}-rmi'
267
268 - project:
269     name: 'functest-opnfv-functest-vnf-rmi'
270     <<: *functest-params
271     container: 'functest-vnf'
272     jobs:
273       - 'functest-{repo}-{container}-{tag}-rmi'
274
275 - job-template:
276     name: 'functest-opnfv-functest-healthcheck-{tag}-{test}-run'
277     parameters:
278       - functest-slave:
279           slave: '{slave}'
280       - functest-build_tag:
281           build_tag: ''
282       - functest-EXTERNAL_NETWORK:
283           EXTERNAL_NETWORK: public
284       - functest-VOLUME_DEVICE_NAME:
285           VOLUME_DEVICE_NAME: sdb
286       - functest-IMAGE_PROPERTIES:
287           IMAGE_PROPERTIES: hw_scsi_model:virtio-scsi,hw_disk_bus:scsi
288     builders:
289       - functest-run-containers:
290           <<: *functest-run-containers
291
292 - project:
293     name: 'functest-opnfv-functest-healthcheck'
294     <<: *functest-params
295     volumes:
296       - /home/opnfv/functest/openstack.creds:/home/opnfv/functest/conf/env_file
297       - /home/opnfv/functest/images:/home/opnfv/functest/images
298     env:
299       - EXTERNAL_NETWORK=$EXTERNAL_NETWORK
300       - VOLUME_DEVICE_NAME=$VOLUME_DEVICE_NAME
301       - IMAGE_PROPERTIES=$IMAGE_PROPERTIES
302     container: 'functest-healthcheck'
303     test:
304       - connection_check
305       - tenantnetwork1
306       - tenantnetwork2
307       - vmready1
308       - vmready2
309       - singlevm1
310       - singlevm2
311       - vping_ssh
312       - vping_userdata
313       - cinder_test
314       - odl
315       - tempest_smoke
316       - tempest_horizon
317     privileged: 'false'
318     network: bridge
319     jobs:
320       - 'functest-opnfv-functest-healthcheck-{tag}-{test}-run'
321
322 - job-template:
323     name: 'functest-opnfv-functest-smoke-{tag}-{test}-run'
324     parameters:
325       - functest-slave:
326           slave: '{slave}'
327       - functest-build_tag:
328           build_tag: ''
329       - functest-EXTERNAL_NETWORK:
330           EXTERNAL_NETWORK: public
331       - functest-VOLUME_DEVICE_NAME:
332           VOLUME_DEVICE_NAME: sdb
333       - functest-IMAGE_PROPERTIES:
334           IMAGE_PROPERTIES: hw_scsi_model:virtio-scsi,hw_disk_bus:scsi
335     builders:
336       - functest-run-containers:
337           <<: *functest-run-containers
338
339 - project:
340     name: 'functest-opnfv-functest-smoke'
341     <<: *functest-params
342     volumes:
343       - /home/opnfv/functest/openstack.creds:/home/opnfv/functest/conf/env_file
344       - /home/opnfv/functest/images:/home/opnfv/functest/images
345     env:
346       - EXTERNAL_NETWORK=$EXTERNAL_NETWORK
347       - VOLUME_DEVICE_NAME=$VOLUME_DEVICE_NAME
348       - IMAGE_PROPERTIES=$IMAGE_PROPERTIES
349     container: 'functest-smoke'
350     test:
351       - tempest_neutron
352       - tempest_cinder
353       - tempest_keystone
354       - tempest_heat
355       - tempest_telemetry
356       - rally_sanity
357       - refstack_defcore
358       - refstack_compute
359       - refstack_object
360       - refstack_platform
361       - tempest_full
362       - tempest_scenario
363       - tempest_slow
364       - patrole
365       - patrole_admin
366       - patrole_member
367       - patrole_reader
368       - networking-bgpvpn
369       - networking-sfc
370       - tempest_barbican
371       - tempest_octavia
372       - tempest_cyborg
373     privileged: 'false'
374     network: bridge
375     exclude:
376       - tag: latest
377         test: refstack_defcore
378       - tag: latest
379         test: networking-bgpvpn
380       - tag: latest
381         test: networking-sfc
382       - tag: latest
383         test: patrole
384       - tag: xena
385         test: refstack_defcore
386       - tag: xena
387         test: networking-bgpvpn
388       - tag: xena
389         test: networking-sfc
390       - tag: xena
391         test: patrole
392       - tag: wallaby
393         test: refstack_defcore
394       - tag: wallaby
395         test: networking-bgpvpn
396       - tag: wallaby
397         test: networking-sfc
398       - tag: wallaby
399         test: patrole
400       - tag: leguer
401         test: refstack_defcore
402       - tag: leguer
403         test: networking-bgpvpn
404       - tag: leguer
405         test: networking-sfc
406       - tag: leguer
407         test: patrole
408       - tag: kali
409         test: refstack_defcore
410       - tag: kali
411         test: networking-bgpvpn
412       - tag: kali
413         test: networking-sfc
414       - tag: kali
415         test: patrole_admin
416       - tag: kali
417         test: patrole_member
418       - tag: kali
419         test: patrole_reader
420       - tag: jerma
421         test: refstack_defcore
422       - tag: jerma
423         test: networking-bgpvpn
424       - tag: jerma
425         test: networking-sfc
426       - tag: jerma
427         test: patrole_admin
428       - tag: jerma
429         test: patrole_member
430       - tag: jerma
431         test: patrole_reader
432       - tag: jerma
433         test: tempest_cyborg
434     jobs:
435       - 'functest-opnfv-functest-smoke-{tag}-{test}-run'
436
437 - job-template:
438     name: 'functest-opnfv-functest-smoke-cntt-{tag}-{test}-run'
439     parameters:
440       - functest-slave:
441           slave: '{slave}'
442       - functest-build_tag:
443           build_tag: ''
444       - functest-EXTERNAL_NETWORK:
445           EXTERNAL_NETWORK: public
446       - functest-VOLUME_DEVICE_NAME:
447           VOLUME_DEVICE_NAME: sdb
448       - functest-IMAGE_PROPERTIES:
449           IMAGE_PROPERTIES: hw_scsi_model:virtio-scsi,hw_disk_bus:scsi
450     builders:
451       - functest-run-containers:
452           <<: *functest-run-containers
453
454 - project:
455     name: 'functest-opnfv-functest-smoke-cntt'
456     <<: *functest-params
457     volumes:
458       - /home/opnfv/functest/openstack.creds:/home/opnfv/functest/conf/env_file
459       - /home/opnfv/functest/images:/home/opnfv/functest/images
460     env:
461       - EXTERNAL_NETWORK=$EXTERNAL_NETWORK
462       - VOLUME_DEVICE_NAME=$VOLUME_DEVICE_NAME
463       - IMAGE_PROPERTIES=$IMAGE_PROPERTIES
464     container: 'functest-smoke-cntt'
465     test:
466       - tempest_neutron_cntt
467       - tempest_cinder_cntt
468       - tempest_keystone_cntt
469       - tempest_heat_cntt
470       - rally_sanity_cntt
471       - tempest_full_cntt
472       - tempest_scenario_cntt
473       - tempest_slow_cntt
474     privileged: 'false'
475     network: bridge
476     jobs:
477       - 'functest-opnfv-functest-smoke-cntt-{tag}-{test}-run'
478
479 - job-template:
480     name: 'functest-opnfv-functest-benchmarking-{tag}-{test}-run'
481     parameters:
482       - functest-slave:
483           slave: '{slave}'
484       - functest-build_tag:
485           build_tag: ''
486       - functest-EXTERNAL_NETWORK:
487           EXTERNAL_NETWORK: public
488       - functest-VOLUME_DEVICE_NAME:
489           VOLUME_DEVICE_NAME: sdb
490       - functest-IMAGE_PROPERTIES:
491           IMAGE_PROPERTIES: hw_scsi_model:virtio-scsi,hw_disk_bus:scsi
492     builders:
493       - functest-run-containers:
494           <<: *functest-run-containers
495
496 - project:
497     name: 'functest-opnfv-functest-benchmarking'
498     <<: *functest-params
499     volumes:
500       - /home/opnfv/functest/openstack.creds:/home/opnfv/functest/conf/env_file
501       - /home/opnfv/functest/images:/home/opnfv/functest/images
502     env:
503       - EXTERNAL_NETWORK=$EXTERNAL_NETWORK
504       - VOLUME_DEVICE_NAME=$VOLUME_DEVICE_NAME
505       - IMAGE_PROPERTIES=$IMAGE_PROPERTIES
506     container: 'functest-benchmarking'
507     test:
508       - rally_full
509       - rally_jobs
510       - vmtp
511       - shaker
512     privileged: 'false'
513     network: bridge
514     jobs:
515       - 'functest-opnfv-functest-benchmarking-{tag}-{test}-run'
516
517 - job-template:
518     name: 'functest-opnfv-functest-benchmarking-cntt-{tag}-{test}-run'
519     parameters:
520       - functest-slave:
521           slave: '{slave}'
522       - functest-build_tag:
523           build_tag: ''
524       - functest-EXTERNAL_NETWORK:
525           EXTERNAL_NETWORK: public
526       - functest-VOLUME_DEVICE_NAME:
527           VOLUME_DEVICE_NAME: sdb
528       - functest-IMAGE_PROPERTIES:
529           IMAGE_PROPERTIES: hw_scsi_model:virtio-scsi,hw_disk_bus:scsi
530     builders:
531       - functest-run-containers:
532           <<: *functest-run-containers
533
534 - project:
535     name: 'functest-opnfv-functest-benchmarking-cntt'
536     <<: *functest-params
537     volumes:
538       - /home/opnfv/functest/openstack.creds:/home/opnfv/functest/conf/env_file
539       - /home/opnfv/functest/images:/home/opnfv/functest/images
540     env:
541       - EXTERNAL_NETWORK=$EXTERNAL_NETWORK
542       - VOLUME_DEVICE_NAME=$VOLUME_DEVICE_NAME
543       - IMAGE_PROPERTIES=$IMAGE_PROPERTIES
544     container: 'functest-benchmarking-cntt'
545     test:
546       - rally_full_cntt
547       - rally_jobs_cntt
548     privileged: 'false'
549     network: bridge
550     jobs:
551       - 'functest-opnfv-functest-benchmarking-cntt-{tag}-{test}-run'
552
553 - job-template:
554     name: 'functest-opnfv-functest-vnf-{tag}-{test}-run'
555     parameters:
556       - functest-slave:
557           slave: '{slave}'
558       - functest-build_tag:
559           build_tag: ''
560       - functest-EXTERNAL_NETWORK:
561           EXTERNAL_NETWORK: public
562       - functest-VOLUME_DEVICE_NAME:
563           VOLUME_DEVICE_NAME: sdb
564       - functest-IMAGE_PROPERTIES:
565           IMAGE_PROPERTIES: hw_scsi_model:virtio-scsi,hw_disk_bus:scsi
566     builders:
567       - functest-run-containers:
568           <<: *functest-run-containers
569
570 - project:
571     name: 'functest-opnfv-functest-vnf'
572     <<: *functest-params
573     volumes:
574       - /home/opnfv/functest/openstack.creds:/home/opnfv/functest/conf/env_file
575       - /home/opnfv/functest/images:/home/opnfv/functest/images
576     env:
577       - EXTERNAL_NETWORK=$EXTERNAL_NETWORK
578       - VOLUME_DEVICE_NAME=$VOLUME_DEVICE_NAME
579       - IMAGE_PROPERTIES=$IMAGE_PROPERTIES
580     container: 'functest-vnf'
581     test:
582       - cloudify
583       - cloudify_ims
584       - heat_ims
585       - vyos_vrouter
586       - juju_epc
587     privileged: 'false'
588     network: bridge
589     jobs:
590       - 'functest-opnfv-functest-vnf-{tag}-{test}-run'
591
592 - builder:
593     name: functest-zip
594     builders:
595       - shell: |
596           set +x
597           volumes=;
598           if [ "{volumes}" != "None" ]; then
599             for i in $(echo {volumes} | tr -d '[]' |sed "s/, / /g" ); \
600               do volumes="-v $i $volumes"; done
601           fi
602           env=;
603           if [ "{env}" != "None" ]; then
604             for i in $(eval echo {env} | tr -d '[]' |sed "s/, / /g" ); \
605               do env="-e $i $env"; done
606           fi
607           [ ! -z "$WORKSPACE" ] && sudo rm -rf $WORKSPACE/results || true
608           if [ "{repo}" = "_" ]; then
609             image={container}:{tag}
610           elif [ "{port}" = "None" ]; then
611             image={repo}/{container}:{tag}
612           else
613             image={repo}:{port}/{container}:{tag}
614           fi
615           sudo docker run --rm \
616             $volumes \
617             $env \
618             -e S3_ENDPOINT_URL=https://storage.googleapis.com \
619             -e S3_DST_URL=s3://artifacts.opnfv.org/functest \
620             -e HTTP_DST_URL=http://artifacts.opnfv.org/functest \
621             -v /home/opnfv/functest/.boto:/root/.boto \
622             -e TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results \
623             -e TEST_DB_EXT_URL=http://testresults.opnfv.org/test/api/v1/results \
624             -e BUILD_TAG=$BUILD_TAG \
625             -v $WORKSPACE/../$JOB_NAME/results:/var/lib/xtesting/results \
626             $image zip_campaign
627
628 - job-template:
629     name: 'functest-{tag}-zip'
630     parameters:
631       - functest-slave:
632           slave: '{slave}'
633       - functest-build_tag:
634           build_tag: ''
635       - functest-EXTERNAL_NETWORK:
636           EXTERNAL_NETWORK: public
637       - functest-VOLUME_DEVICE_NAME:
638           VOLUME_DEVICE_NAME: sdb
639       - functest-IMAGE_PROPERTIES:
640           IMAGE_PROPERTIES: hw_scsi_model:virtio-scsi,hw_disk_bus:scsi
641     builders:
642       - functest-zip:
643           <<: *functest-containers
644           volumes: '{volumes}'
645           env: '{env}'
646
647 - project:
648     name: 'functest-{tag}-zip'
649     <<: *functest-params
650     volumes:
651       - /home/opnfv/functest/openstack.creds:/home/opnfv/functest/conf/env_file
652       - /home/opnfv/functest/images:/home/opnfv/functest/images
653     env:
654       - EXTERNAL_NETWORK=$EXTERNAL_NETWORK
655       - VOLUME_DEVICE_NAME=$VOLUME_DEVICE_NAME
656       - IMAGE_PROPERTIES=$IMAGE_PROPERTIES
657     container: 'functest-healthcheck'
658     jobs:
659       - 'functest-{tag}-zip'
660
661 - job-template:
662     name: 'functest-{tag}-daily'
663     project-type: multijob
664     triggers:
665       - timed: '@weekly'
666     parameters:
667       - functest-slave:
668           slave: '{slave}'
669       - functest-build_tag:
670           build_tag: ''
671       - functest-EXTERNAL_NETWORK:
672           EXTERNAL_NETWORK: public
673       - functest-VOLUME_DEVICE_NAME:
674           VOLUME_DEVICE_NAME: sdb
675       - functest-IMAGE_PROPERTIES:
676           IMAGE_PROPERTIES: hw_scsi_model:virtio-scsi,hw_disk_bus:scsi
677     # PyYAML and yamllint differ here
678     # see https://github.com/yaml/pyyaml/issues/234
679     # yamllint disable rule:indentation
680     properties:
681       - build-blocker:
682           blocking-jobs:
683           - ^functest-(pi-)*{tag}-(daily|docker|review)$
684     # yamllint enable rule:indentation
685     builders:
686       - multijob:
687           name: remove former images
688           projects:
689             - name: 'functest-opnfv-functest-healthcheck-{tag}-rmi'
690               <<: *functest-jobs
691             - name: 'functest-opnfv-functest-smoke-{tag}-rmi'
692               <<: *functest-jobs
693             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-rmi'
694               <<: *functest-jobs
695             - name: 'functest-opnfv-functest-benchmarking-{tag}-rmi'
696               <<: *functest-jobs
697             - name: 'functest-opnfv-functest-benchmarking-cntt-{tag}-rmi'
698               <<: *functest-jobs
699             - name: 'functest-opnfv-functest-vnf-{tag}-rmi'
700               <<: *functest-jobs
701       - multijob:
702           name: pull containers
703           projects:
704             - name: 'functest-opnfv-functest-healthcheck-{tag}-pull'
705               <<: *functest-jobs
706             - name: 'functest-opnfv-functest-smoke-{tag}-pull'
707               <<: *functest-jobs
708             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-pull'
709               <<: *functest-jobs
710             - name: 'functest-opnfv-functest-benchmarking-{tag}-pull'
711               <<: *functest-jobs
712             - name: 'functest-opnfv-functest-benchmarking-cntt-{tag}-pull'
713               <<: *functest-jobs
714             - name: 'functest-opnfv-functest-vnf-{tag}-pull'
715               <<: *functest-jobs
716       - multijob:
717           name: opnfv/functest-healthcheck:{tag}
718           projects:
719             - name: 'functest-opnfv-functest-healthcheck-{tag}-connection_check-run'
720               <<: *functest-jobs
721             - name: 'functest-opnfv-functest-healthcheck-{tag}-tenantnetwork1-run'
722               <<: *functest-jobs
723             - name: 'functest-opnfv-functest-healthcheck-{tag}-tenantnetwork2-run'
724               <<: *functest-jobs
725             - name: 'functest-opnfv-functest-healthcheck-{tag}-vmready1-run'
726               <<: *functest-jobs
727             - name: 'functest-opnfv-functest-healthcheck-{tag}-vmready2-run'
728               <<: *functest-jobs
729             - name: 'functest-opnfv-functest-healthcheck-{tag}-singlevm1-run'
730               <<: *functest-jobs
731             - name: 'functest-opnfv-functest-healthcheck-{tag}-singlevm2-run'
732               <<: *functest-jobs
733             - name: 'functest-opnfv-functest-healthcheck-{tag}-vping_ssh-run'
734               <<: *functest-jobs
735             - name: 'functest-opnfv-functest-healthcheck-{tag}-vping_userdata-run'
736               <<: *functest-jobs
737             - name: 'functest-opnfv-functest-healthcheck-{tag}-cinder_test-run'
738               <<: *functest-jobs
739             - name: 'functest-opnfv-functest-healthcheck-{tag}-odl-run'
740               <<: *functest-jobs
741             - name: 'functest-opnfv-functest-healthcheck-{tag}-tempest_smoke-run'
742               <<: *functest-jobs
743             - name: 'functest-opnfv-functest-healthcheck-{tag}-tempest_horizon-run'
744               <<: *functest-jobs
745       - multijob:
746           name: opnfv/functest-smoke:{tag}
747           projects:
748             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_neutron-run'
749               <<: *functest-jobs
750             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_cinder-run'
751               <<: *functest-jobs
752             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_keystone-run'
753               <<: *functest-jobs
754             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_heat-run'
755               <<: *functest-jobs
756             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_telemetry-run'
757               <<: *functest-jobs
758             - name: 'functest-opnfv-functest-smoke-{tag}-rally_sanity-run'
759               <<: *functest-jobs
760             - name: 'functest-opnfv-functest-smoke-{tag}-refstack_defcore-run'
761               <<: *functest-jobs
762             - name: 'functest-opnfv-functest-smoke-{tag}-refstack_compute-run'
763               <<: *functest-jobs
764             - name: 'functest-opnfv-functest-smoke-{tag}-refstack_object-run'
765               <<: *functest-jobs
766             - name: 'functest-opnfv-functest-smoke-{tag}-refstack_platform-run'
767               <<: *functest-jobs
768             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_full-run'
769               <<: *functest-jobs
770             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_scenario-run'
771               <<: *functest-jobs
772             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_slow-run'
773               <<: *functest-jobs
774             - name: 'functest-opnfv-functest-smoke-{tag}-patrole-run'
775               <<: *functest-jobs
776             - name: 'functest-opnfv-functest-smoke-{tag}-patrole_admin-run'
777               <<: *functest-jobs
778             - name: 'functest-opnfv-functest-smoke-{tag}-patrole_member-run'
779               <<: *functest-jobs
780             - name: 'functest-opnfv-functest-smoke-{tag}-patrole_reader-run'
781               <<: *functest-jobs
782             - name: 'functest-opnfv-functest-smoke-{tag}-networking-bgpvpn-run'
783               <<: *functest-jobs
784             - name: 'functest-opnfv-functest-smoke-{tag}-networking-sfc-run'
785               <<: *functest-jobs
786             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_barbican-run'
787               <<: *functest-jobs
788             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_octavia-run'
789               <<: *functest-jobs
790             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_cyborg-run'
791               <<: *functest-jobs
792       - multijob:
793           name: opnfv/functest-smoke-cntt:{tag}
794           projects:
795             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-tempest_neutron_cntt-run'
796               <<: *functest-jobs
797             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-tempest_cinder_cntt-run'
798               <<: *functest-jobs
799             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-tempest_keystone_cntt-run'
800               <<: *functest-jobs
801             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-tempest_heat_cntt-run'
802               <<: *functest-jobs
803             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-rally_sanity_cntt-run'
804               <<: *functest-jobs
805             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-tempest_full_cntt-run'
806               <<: *functest-jobs
807             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-tempest_scenario_cntt-run'
808               <<: *functest-jobs
809             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-tempest_slow_cntt-run'
810               <<: *functest-jobs
811       - multijob:
812           name: opnfv/functest-benchmarking:{tag}
813           projects:
814             - name: 'functest-opnfv-functest-benchmarking-{tag}-rally_full-run'
815               <<: *functest-jobs
816             - name: 'functest-opnfv-functest-benchmarking-{tag}-rally_jobs-run'
817               <<: *functest-jobs
818             - name: 'functest-opnfv-functest-benchmarking-{tag}-vmtp-run'
819               <<: *functest-jobs
820             - name: 'functest-opnfv-functest-benchmarking-{tag}-shaker-run'
821               <<: *functest-jobs
822       - multijob:
823           name: opnfv/functest-benchmarking-cntt:{tag}
824           projects:
825             - name: 'functest-opnfv-functest-benchmarking-cntt-{tag}-rally_full_cntt-run'
826               <<: *functest-jobs
827             - name: 'functest-opnfv-functest-benchmarking-cntt-{tag}-rally_jobs_cntt-run'
828               <<: *functest-jobs
829       - multijob:
830           name: opnfv/functest-vnf:{tag}
831           projects:
832             - name: 'functest-opnfv-functest-vnf-{tag}-cloudify-run'
833               <<: *functest-jobs
834             - name: 'functest-opnfv-functest-vnf-{tag}-cloudify_ims-run'
835               <<: *functest-jobs
836             - name: 'functest-opnfv-functest-vnf-{tag}-heat_ims-run'
837               <<: *functest-jobs
838             - name: 'functest-opnfv-functest-vnf-{tag}-vyos_vrouter-run'
839               <<: *functest-jobs
840             - name: 'functest-opnfv-functest-vnf-{tag}-juju_epc-run'
841               <<: *functest-jobs
842       - multijob:
843           name: dump all campaign data
844           projects:
845             - name: 'functest-{tag}-zip'
846               <<: *functest-jobs
847     publishers:
848       - email:
849           recipients: cedric.ollivier@orange.com
850
851 - project:
852     name: 'functest-daily'
853     <<: *functest-params
854     jobs:
855       - 'functest-{tag}-daily'
856
857 - view:
858     name: functest
859     view-type: list
860     columns:
861       - status
862       - weather
863       - job
864       - last-success
865       - last-failure
866       - last-duration
867     regex: ^functest-[a-z0-9.]+-daily$
868
869 - functest-build-containers: &functest-build-containers
870     name: 'functest-build-containers'
871     <<: *functest-containers
872     ref_arg: '{ref_arg}'
873     path: '{path}'
874     build_args: '{build_args}'
875     from: '{from}'
876
877 - builder:
878     name: functest-build-containers
879     builders:
880       - shell: |
881           set +x
882           if [ "{repo}" = "_" ]; then
883             image={container}:{tag}
884           elif [ "{port}" = "None" ]; then
885             image={repo}/{container}:{tag}
886           else
887             image={repo}:{port}/{container}:{tag}
888           fi
889           build_args=""
890           if [ "{build_args}" != "None" ]; then
891             for i in $(echo {build_args} | tr -d '[]' |sed "s/, / /g" ); \
892               do build_args="--build-arg $i $build_args"; done
893           fi
894           if [ "{ref_arg}" != "None" ]; then
895             build_args="$build_args --build-arg {ref_arg}={ref}"
896           fi
897           cd {path}
898           if [ "{from}" != "None" ]; then
899               sed -i {from} Dockerfile
900           fi
901           sudo docker build $build_args \
902             --pull=false --no-cache --force-rm=true \
903             -t $image .
904
905 - scm:
906     name: functest-scm
907     scm:
908       - git:
909           url: 'https://gerrit.opnfv.org/gerrit/functest'
910           refspec: '+refs/heads/*:refs/remotes/origin/* +refs/changes/*:refs/changes/*'
911           branches:
912             - '{ref}'
913
914 - functest-dep: &functest-dep
915     name: 'functest-containers'
916     repo: '{repo}'
917     port: '{port}'
918     tag: '{tag}'
919     dependency: '{dependency}'
920
921 - builder:
922     name: functest-pull-dep-images
923     builders:
924       - shell: |
925           set +x
926           if [ "_" = "_" ]; then
927             image=alpine:{dependency}
928           elif [ "None" = "None" ]; then
929             image=_/alpine:{dependency}
930           else
931             image=_:/alpine:{dependency}
932           fi
933           sudo docker pull $image || true
934
935 - builder:
936     name: functest-remove-dep-images
937     builders:
938       - shell: |
939           set +x
940           if [ "_" = "_" ]; then
941             image=alpine:{dependency}
942           elif [ "" = "None" ]; then
943             image=_/alpine:{dependency}
944           else
945             image=_:/alpine:{dependency}
946           fi
947           sudo docker rmi $image || true
948
949 - job-template:
950     name: 'functest-{repo}-{tag}-dep-pull'
951     parameters:
952       - functest-slave:
953           slave: '{slave}'
954     builders:
955       - functest-pull-dep-images:
956           <<: *functest-dep
957
958 - project:
959     name: 'functest-{repo}-{tag}-dep-pull'
960     <<: *functest-params
961     jobs:
962       - 'functest-{repo}-{tag}-dep-pull'
963
964 - job-template:
965     name: 'functest-{repo}-{tag}-dep-rmi'
966     parameters:
967       - functest-slave:
968           slave: '{slave}'
969     builders:
970       - functest-remove-dep-images:
971           <<: *functest-dep
972
973 - project:
974     name: 'functest-{repo}-{tag}-dep-rmi'
975     <<: *functest-params
976     jobs:
977       - 'functest-{repo}-{tag}-dep-rmi'
978
979 - builder:
980     name: functest-tox
981     builders:
982       - shell: |
983           set +x
984           sudo apt-get update && \
985           sudo DEBIAN_FRONTEND=noninteractive apt-get dist-upgrade -y
986           sudo DEBIAN_FRONTEND=noninteractive \
987           apt-get install software-properties-common gpg -y
988           sudo add-apt-repository -y ppa:deadsnakes/ppa
989           sudo apt-get update && sudo DEBIAN_FRONTEND=noninteractive \
990           apt-get install \
991             python3.9 python3.9-dev python3.9-distutils \
992             python3.8 python3.8-dev python3.8-distutils \
993             python3.7 python3.7-dev python3.6 python3.6-dev \
994             python python-dev python3-pip enchant -y
995           sudo pip3 install tox tox-pip-version
996
997           tox
998
999 - job-template:
1000     name: 'functest-{tag}-tox'
1001     scm:
1002       - functest-scm:
1003           ref: $GERRIT_REFSPEC
1004     triggers:
1005       - functest-patchset-created:
1006           branch: '{branch}'
1007     parameters:
1008       - functest-slave:
1009           slave: '{slave}'
1010     builders:
1011       - functest-tox:
1012
1013 - project:
1014     name: functest-tox
1015     <<: *functest-params
1016     jobs:
1017       - 'functest-{tag}-tox'
1018
1019 - job-template:
1020     name: 'functest-{repo}-{container}-{tag}-gate'
1021     parameters:
1022       - functest-slave:
1023           slave: '{slave}'
1024     scm:
1025       - functest-scm:
1026           ref: $GERRIT_REFSPEC
1027     builders:
1028       - functest-build-containers:
1029           <<: *functest-build-containers
1030           ref: $GERRIT_REFSPEC
1031           build_args: '{build_args}'
1032
1033 - project:
1034     name: functest-opnfv-functest-core-{tag}-gate
1035     <<: *functest-params
1036     container: functest-core
1037     ref_arg: BRANCH
1038     path: docker/core
1039     jobs:
1040       - 'functest-{repo}-{container}-{tag}-gate'
1041
1042 - project:
1043     name: functest-opnfv-functest-tempest-{tag}-gate
1044     <<: *functest-params
1045     container: functest-tempest
1046     ref_arg: BRANCH
1047     path: docker/tempest
1048     exclude:
1049       - {'tag': 'latest'}
1050       - {'tag': 'xena'}
1051       - {'tag': 'wallaby'}
1052       - {'tag': 'leguer'}
1053       - {'tag': 'kali'}
1054       - {'tag': 'jerma'}
1055     jobs:
1056       - 'functest-{repo}-{container}-{tag}-gate'
1057
1058 - project:
1059     name: functest-opnfv-functest-healthcheck-{tag}-gate
1060     <<: *functest-params
1061     container: functest-healthcheck
1062     ref_arg: BRANCH
1063     path: docker/healthcheck
1064     jobs:
1065       - 'functest-{repo}-{container}-{tag}-gate'
1066
1067 - project:
1068     name: functest-opnfv-functest-smoke-{tag}-gate
1069     <<: *functest-params
1070     container: functest-smoke
1071     ref_arg: BRANCH
1072     path: docker/smoke
1073     jobs:
1074       - 'functest-{repo}-{container}-{tag}-gate'
1075
1076 - project:
1077     name: functest-opnfv-functest-benchmarking-{tag}-gate
1078     <<: *functest-params
1079     container: functest-benchmarking
1080     ref_arg: BRANCH
1081     path: docker/benchmarking
1082     jobs:
1083       - 'functest-{repo}-{container}-{tag}-gate'
1084
1085 - project:
1086     name: functest-opnfv-functest-vnf-{tag}-gate
1087     <<: *functest-params
1088     container: functest-vnf
1089     ref_arg:
1090     path: docker/vnf
1091     jobs:
1092       - 'functest-{repo}-{container}-{tag}-gate'
1093
1094 - project:
1095     name: functest-opnfv-functest-smoke-cntt-{tag}-gate
1096     <<: *functest-params
1097     container: functest-smoke-cntt
1098     ref_arg: BRANCH
1099     path: docker/smoke-cntt
1100     jobs:
1101       - 'functest-{repo}-{container}-{tag}-gate'
1102
1103 - project:
1104     name: functest-opnfv-functest-benchmarking-cntt-{tag}-gate
1105     <<: *functest-params
1106     container: functest-benchmarking-cntt
1107     ref_arg: BRANCH
1108     path: docker/benchmarking-cntt
1109     jobs:
1110       - 'functest-{repo}-{container}-{tag}-gate'
1111
1112 - trigger:
1113     name: functest-patchset-created
1114     triggers:
1115       - gerrit:
1116           trigger-on:
1117             - patchset-created-event
1118             - comment-added-contains-event:
1119                 comment-contains-value: 'recheck'
1120             - comment-added-contains-event:
1121                 comment-contains-value: 'reverify'
1122           projects:
1123             - project-compare-type: 'ANT'
1124               project-pattern: 'functest'
1125               branches:
1126                 - branch-compare-type: 'ANT'
1127                   branch-pattern: '**/{branch}'
1128
1129 - job-template:
1130     name: 'functest-{tag}-review'
1131     project-type: multijob
1132     triggers:
1133       - functest-patchset-created:
1134           branch: '{branch}'
1135     parameters:
1136       - functest-slave:
1137           slave: '{slave}'
1138       - functest-build_tag:
1139           build_tag: ''
1140       - functest-EXTERNAL_NETWORK:
1141           EXTERNAL_NETWORK: public
1142       - functest-VOLUME_DEVICE_NAME:
1143           VOLUME_DEVICE_NAME: sdb
1144       - functest-IMAGE_PROPERTIES:
1145           IMAGE_PROPERTIES: hw_scsi_model:virtio-scsi,hw_disk_bus:scsi
1146     # PyYAML and yamllint differ here
1147     # see https://github.com/yaml/pyyaml/issues/234
1148     # yamllint disable rule:indentation
1149     properties:
1150       - build-blocker:
1151           blocking-jobs:
1152           - ^functest-(pi-)*{tag}-(daily|docker|review)$
1153     # yamllint enable rule:indentation
1154     builders:
1155       - multijob:
1156           name: remove former images
1157           projects:
1158             - name: 'functest-opnfv-functest-healthcheck-{tag}-rmi'
1159               <<: *functest-jobs
1160             - name: 'functest-opnfv-functest-smoke-{tag}-rmi'
1161               <<: *functest-jobs
1162             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-rmi'
1163               <<: *functest-jobs
1164             - name: 'functest-opnfv-functest-benchmarking-{tag}-rmi'
1165               <<: *functest-jobs
1166             - name: 'functest-opnfv-functest-benchmarking-cntt-{tag}-rmi'
1167               <<: *functest-jobs
1168             - name: 'functest-opnfv-functest-vnf-{tag}-rmi'
1169               <<: *functest-jobs
1170       - multijob:
1171           name: remove dependency
1172           projects:
1173             - name: 'functest-{repo}-{tag}-dep-rmi'
1174               <<: *functest-jobs
1175       - multijob:
1176           name: pull dependency
1177           projects:
1178             - name: 'functest-{repo}-{tag}-dep-pull'
1179               <<: *functest-jobs
1180       - multijob:
1181           name: build opnfv/functest-core
1182           projects:
1183             - name: 'functest-opnfv-functest-core-{tag}-gate'
1184               <<: *functest-jobs
1185       - multijob:
1186           name: build opnfv/functest-tempest
1187           projects:
1188             - name: 'functest-opnfv-functest-tempest-{tag}-gate'
1189               <<: *functest-jobs
1190       - multijob:
1191           name: build containers
1192           projects:
1193             - name: 'functest-opnfv-functest-healthcheck-{tag}-gate'
1194               <<: *functest-jobs
1195             - name: 'functest-opnfv-functest-smoke-{tag}-gate'
1196               <<: *functest-jobs
1197             - name: 'functest-opnfv-functest-benchmarking-{tag}-gate'
1198               <<: *functest-jobs
1199             - name: 'functest-opnfv-functest-vnf-{tag}-gate'
1200               <<: *functest-jobs
1201       - multijob:
1202           name: build cntt containers
1203           projects:
1204             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-gate'
1205               <<: *functest-jobs
1206             - name: 'functest-opnfv-functest-benchmarking-cntt-{tag}-gate'
1207               <<: *functest-jobs
1208       - multijob:
1209           name: opnfv/functest-healthcheck:{tag}
1210           projects:
1211             - name: 'functest-opnfv-functest-healthcheck-{tag}-connection_check-run'
1212               <<: *functest-jobs
1213             - name: 'functest-opnfv-functest-healthcheck-{tag}-tenantnetwork1-run'
1214               <<: *functest-jobs
1215             - name: 'functest-opnfv-functest-healthcheck-{tag}-tenantnetwork2-run'
1216               <<: *functest-jobs
1217             - name: 'functest-opnfv-functest-healthcheck-{tag}-vmready1-run'
1218               <<: *functest-jobs
1219             - name: 'functest-opnfv-functest-healthcheck-{tag}-vmready2-run'
1220               <<: *functest-jobs
1221             - name: 'functest-opnfv-functest-healthcheck-{tag}-singlevm1-run'
1222               <<: *functest-jobs
1223             - name: 'functest-opnfv-functest-healthcheck-{tag}-singlevm2-run'
1224               <<: *functest-jobs
1225             - name: 'functest-opnfv-functest-healthcheck-{tag}-vping_ssh-run'
1226               <<: *functest-jobs
1227             - name: 'functest-opnfv-functest-healthcheck-{tag}-vping_userdata-run'
1228               <<: *functest-jobs
1229             - name: 'functest-opnfv-functest-healthcheck-{tag}-cinder_test-run'
1230               <<: *functest-jobs
1231             - name: 'functest-opnfv-functest-healthcheck-{tag}-odl-run'
1232               <<: *functest-jobs
1233             - name: 'functest-opnfv-functest-healthcheck-{tag}-tempest_smoke-run'
1234               <<: *functest-jobs
1235             - name: 'functest-opnfv-functest-healthcheck-{tag}-tempest_horizon-run'
1236               <<: *functest-jobs
1237       - multijob:
1238           name: opnfv/functest-smoke:{tag}
1239           projects:
1240             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_neutron-run'
1241               <<: *functest-jobs
1242             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_cinder-run'
1243               <<: *functest-jobs
1244             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_keystone-run'
1245               <<: *functest-jobs
1246             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_heat-run'
1247               <<: *functest-jobs
1248             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_telemetry-run'
1249               <<: *functest-jobs
1250             - name: 'functest-opnfv-functest-smoke-{tag}-rally_sanity-run'
1251               <<: *functest-jobs
1252             - name: 'functest-opnfv-functest-smoke-{tag}-refstack_defcore-run'
1253               <<: *functest-jobs
1254             - name: 'functest-opnfv-functest-smoke-{tag}-refstack_compute-run'
1255               <<: *functest-jobs
1256             - name: 'functest-opnfv-functest-smoke-{tag}-refstack_object-run'
1257               <<: *functest-jobs
1258             - name: 'functest-opnfv-functest-smoke-{tag}-refstack_platform-run'
1259               <<: *functest-jobs
1260             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_full-run'
1261               <<: *functest-jobs
1262             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_scenario-run'
1263               <<: *functest-jobs
1264             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_slow-run'
1265               <<: *functest-jobs
1266             - name: 'functest-opnfv-functest-smoke-{tag}-patrole-run'
1267               <<: *functest-jobs
1268             - name: 'functest-opnfv-functest-smoke-{tag}-patrole_admin-run'
1269               <<: *functest-jobs
1270             - name: 'functest-opnfv-functest-smoke-{tag}-patrole_member-run'
1271               <<: *functest-jobs
1272             - name: 'functest-opnfv-functest-smoke-{tag}-patrole_reader-run'
1273               <<: *functest-jobs
1274             - name: 'functest-opnfv-functest-smoke-{tag}-networking-bgpvpn-run'
1275               <<: *functest-jobs
1276             - name: 'functest-opnfv-functest-smoke-{tag}-networking-sfc-run'
1277               <<: *functest-jobs
1278             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_barbican-run'
1279               <<: *functest-jobs
1280             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_octavia-run'
1281               <<: *functest-jobs
1282             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_cyborg-run'
1283               <<: *functest-jobs
1284       - multijob:
1285           name: opnfv/functest-smoke-cntt:{tag}
1286           projects:
1287             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-tempest_neutron_cntt-run'
1288               <<: *functest-jobs
1289             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-tempest_cinder_cntt-run'
1290               <<: *functest-jobs
1291             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-tempest_keystone_cntt-run'
1292               <<: *functest-jobs
1293             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-tempest_heat_cntt-run'
1294               <<: *functest-jobs
1295             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-rally_sanity_cntt-run'
1296               <<: *functest-jobs
1297             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-tempest_full_cntt-run'
1298               <<: *functest-jobs
1299             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-tempest_scenario_cntt-run'
1300               <<: *functest-jobs
1301             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-tempest_slow_cntt-run'
1302               <<: *functest-jobs
1303       - multijob:
1304           name: opnfv/functest-benchmarking:{tag}
1305           projects:
1306             - name: 'functest-opnfv-functest-benchmarking-{tag}-rally_full-run'
1307               <<: *functest-jobs
1308             - name: 'functest-opnfv-functest-benchmarking-{tag}-rally_jobs-run'
1309               <<: *functest-jobs
1310             - name: 'functest-opnfv-functest-benchmarking-{tag}-vmtp-run'
1311               <<: *functest-jobs
1312             - name: 'functest-opnfv-functest-benchmarking-{tag}-shaker-run'
1313               <<: *functest-jobs
1314       - multijob:
1315           name: opnfv/functest-benchmarking-cntt:{tag}
1316           projects:
1317             - name: 'functest-opnfv-functest-benchmarking-cntt-{tag}-rally_full_cntt-run'
1318               <<: *functest-jobs
1319             - name: 'functest-opnfv-functest-benchmarking-cntt-{tag}-rally_jobs_cntt-run'
1320               <<: *functest-jobs
1321       - multijob:
1322           name: opnfv/functest-vnf:{tag}
1323           projects:
1324             - name: 'functest-opnfv-functest-vnf-{tag}-cloudify-run'
1325               <<: *functest-jobs
1326             - name: 'functest-opnfv-functest-vnf-{tag}-cloudify_ims-run'
1327               <<: *functest-jobs
1328             - name: 'functest-opnfv-functest-vnf-{tag}-heat_ims-run'
1329               <<: *functest-jobs
1330             - name: 'functest-opnfv-functest-vnf-{tag}-vyos_vrouter-run'
1331               <<: *functest-jobs
1332             - name: 'functest-opnfv-functest-vnf-{tag}-juju_epc-run'
1333               <<: *functest-jobs
1334     publishers:
1335       - email:
1336           recipients: cedric.ollivier@orange.com
1337
1338 - project:
1339     name: 'functest-review'
1340     <<: *functest-params
1341     jobs:
1342       - 'functest-{tag}-review'
1343
1344 - view:
1345     name: functest-review
1346     view-type: list
1347     columns:
1348       - status
1349       - weather
1350       - job
1351       - last-success
1352       - last-failure
1353       - last-duration
1354     regex: ^functest-[a-z0-9.]+-review$
1355
1356 - view:
1357     name: functest-tox
1358     view-type: list
1359     columns:
1360       - status
1361       - weather
1362       - job
1363       - last-success
1364       - last-failure
1365       - last-duration
1366     regex: ^functest-[a-z0-9.]+-tox$
1367
1368 - builder:
1369     name: functest-push-containers
1370     builders:
1371       - shell: |
1372           set +x
1373           if [ "{repo}" = "_" ]; then
1374             image={container}:{tag}
1375           elif [ "{port}" = "None" ]; then
1376             image={repo}/{container}:{tag}
1377           else
1378             image={repo}:{port}/{container}:{tag}
1379           fi
1380           sudo docker push $image
1381
1382 - trigger:
1383     name: functest-commit
1384     triggers:
1385       - pollscm:
1386           cron: "*/30 * * * *"
1387
1388 - job-template:
1389     name: 'functest-{repo}-{container}-{tag}-build'
1390     parameters:
1391       - functest-slave:
1392           slave: '{slave}'
1393     scm:
1394       - functest-scm:
1395           ref: '{branch}'
1396     builders:
1397       - functest-build-containers:
1398           <<: *functest-build-containers
1399           ref: '{branch}'
1400           build_args: '{build_args}'
1401       - functest-push-containers:
1402           <<: *functest-build-containers
1403           ref: '{branch}'
1404
1405 - project:
1406     name: functest-opnfv-functest-core-{tag}-build
1407     <<: *functest-params
1408     container: functest-core
1409     ref_arg: BRANCH
1410     path: docker/core
1411     jobs:
1412       - 'functest-{repo}-{container}-{tag}-build'
1413
1414 - project:
1415     name: functest-opnfv-functest-tempest-{tag}-build
1416     <<: *functest-params
1417     container: functest-tempest
1418     ref_arg: BRANCH
1419     path: docker/tempest
1420     exclude:
1421       - {'tag': 'latest'}
1422       - {'tag': 'xena'}
1423       - {'tag': 'wallaby'}
1424       - {'tag': 'leguer'}
1425       - {'tag': 'kali'}
1426       - {'tag': 'jerma'}
1427     jobs:
1428       - 'functest-{repo}-{container}-{tag}-build'
1429
1430 - project:
1431     name: functest-opnfv-functest-healthcheck-{tag}-build
1432     <<: *functest-params
1433     container: functest-healthcheck
1434     ref_arg: BRANCH
1435     path: docker/healthcheck
1436     jobs:
1437       - 'functest-{repo}-{container}-{tag}-build'
1438
1439 - project:
1440     name: functest-opnfv-functest-smoke-{tag}-build
1441     <<: *functest-params
1442     container: functest-smoke
1443     ref_arg: BRANCH
1444     path: docker/smoke
1445     jobs:
1446       - 'functest-{repo}-{container}-{tag}-build'
1447
1448 - project:
1449     name: functest-opnfv-functest-benchmarking-{tag}-build
1450     <<: *functest-params
1451     container: functest-benchmarking
1452     ref_arg: BRANCH
1453     path: docker/benchmarking
1454     jobs:
1455       - 'functest-{repo}-{container}-{tag}-build'
1456
1457 - project:
1458     name: functest-opnfv-functest-vnf-{tag}-build
1459     <<: *functest-params
1460     container: functest-vnf
1461     ref_arg:
1462     path: docker/vnf
1463     jobs:
1464       - 'functest-{repo}-{container}-{tag}-build'
1465
1466 - project:
1467     name: functest-opnfv-functest-smoke-cntt-{tag}-build
1468     <<: *functest-params
1469     container: functest-smoke-cntt
1470     ref_arg: BRANCH
1471     path: docker/smoke-cntt
1472     jobs:
1473       - 'functest-{repo}-{container}-{tag}-build'
1474
1475 - project:
1476     name: functest-opnfv-functest-benchmarking-cntt-{tag}-build
1477     <<: *functest-params
1478     container: functest-benchmarking-cntt
1479     ref_arg: BRANCH
1480     path: docker/benchmarking-cntt
1481     jobs:
1482       - 'functest-{repo}-{container}-{tag}-build'
1483
1484 - job-template:
1485     name: 'functest-{tag}-docker'
1486     project-type: multijob
1487     triggers:
1488       - functest-commit
1489     scm:
1490       - functest-scm:
1491           ref: '{branch}'
1492     parameters:
1493       - functest-slave:
1494           slave: '{slave}'
1495     # PyYAML and yamllint differ here
1496     # see https://github.com/yaml/pyyaml/issues/234
1497     # yamllint disable rule:indentation
1498     properties:
1499       - build-blocker:
1500           blocking-jobs:
1501           - ^functest-(pi-)*{tag}-(daily|docker|review)$
1502     # yamllint enable rule:indentation
1503     builders:
1504       - multijob:
1505           name: remove dependency
1506           projects:
1507             - name: 'functest-{repo}-{tag}-dep-rmi'
1508               <<: *functest-jobs
1509       - multijob:
1510           name: pull dependency
1511           projects:
1512             - name: 'functest-{repo}-{tag}-dep-pull'
1513               <<: *functest-jobs
1514       - multijob:
1515           name: build opnfv/functest-core
1516           projects:
1517             - name: 'functest-opnfv-functest-core-{tag}-build'
1518               <<: *functest-jobs
1519       - multijob:
1520           name: build opnfv/functest-tempest
1521           projects:
1522             - name: 'functest-opnfv-functest-tempest-{tag}-build'
1523               <<: *functest-jobs
1524       - multijob:
1525           name: build containers
1526           projects:
1527             - name: 'functest-opnfv-functest-healthcheck-{tag}-build'
1528               <<: *functest-jobs
1529             - name: 'functest-opnfv-functest-smoke-{tag}-build'
1530               <<: *functest-jobs
1531             - name: 'functest-opnfv-functest-benchmarking-{tag}-build'
1532               <<: *functest-jobs
1533             - name: 'functest-opnfv-functest-vnf-{tag}-build'
1534               <<: *functest-jobs
1535       - multijob:
1536           name: build cntt containers
1537           projects:
1538             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-build'
1539               <<: *functest-jobs
1540             - name: 'functest-opnfv-functest-benchmarking-cntt-{tag}-build'
1541               <<: *functest-jobs
1542     publishers:
1543       - email:
1544           recipients: cedric.ollivier@orange.com
1545
1546 - builder:
1547     name: functest-trivy
1548     builders:
1549       - shell: |
1550           sudo apt-get update && sudo DEBIAN_FRONTEND=noninteractive \
1551           apt-get install curl -y
1552
1553           curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sudo sh -s -- -b .
1554           if [ "{repo}" = "_" ]; then
1555             image={container}:{tag}
1556           elif [ "{port}" = "None" ]; then
1557             image={repo}/{container}:{tag}
1558           else
1559             image={repo}:{port}/{container}:{tag}
1560           fi
1561           ./trivy --exit-code 1 $image
1562
1563 - job-template:
1564     name: 'functest-{repo}-{container}-{tag}-trivy'
1565     triggers:
1566       - timed: '@weekly'
1567     parameters:
1568       - functest-slave:
1569           slave: '{slave}'
1570     builders:
1571       - functest-trivy:
1572           <<: *functest-containers
1573     publishers:
1574       - email:
1575           recipients: cedric.ollivier@orange.com
1576
1577 - project:
1578     name: 'functest-opnfv-functest-core-trivy'
1579     <<: *functest-params
1580     container: 'functest-core'
1581     jobs:
1582       - 'functest-{repo}-{container}-{tag}-trivy'
1583
1584 - project:
1585     name: 'functest-opnfv-functest-tempest-trivy'
1586     <<: *functest-params
1587     container: 'functest-tempest'
1588     jobs:
1589       - 'functest-{repo}-{container}-{tag}-trivy'
1590
1591 - project:
1592     name: 'functest-opnfv-functest-healthcheck-trivy'
1593     <<: *functest-params
1594     container: 'functest-healthcheck'
1595     jobs:
1596       - 'functest-{repo}-{container}-{tag}-trivy'
1597
1598 - project:
1599     name: 'functest-opnfv-functest-smoke-trivy'
1600     <<: *functest-params
1601     container: 'functest-smoke'
1602     jobs:
1603       - 'functest-{repo}-{container}-{tag}-trivy'
1604
1605 - project:
1606     name: 'functest-opnfv-functest-benchmarking-trivy'
1607     <<: *functest-params
1608     container: 'functest-benchmarking'
1609     jobs:
1610       - 'functest-{repo}-{container}-{tag}-trivy'
1611
1612 - project:
1613     name: 'functest-opnfv-functest-vnf-trivy'
1614     <<: *functest-params
1615     container: 'functest-vnf'
1616     jobs:
1617       - 'functest-{repo}-{container}-{tag}-trivy'
1618
1619 - project:
1620     name: 'functest-opnfv-functest-smoke-cntt-trivy'
1621     <<: *functest-params
1622     container: 'functest-smoke-cntt'
1623     jobs:
1624       - 'functest-{repo}-{container}-{tag}-trivy'
1625
1626 - project:
1627     name: 'functest-opnfv-functest-benchmarking-cntt-trivy'
1628     <<: *functest-params
1629     container: 'functest-benchmarking-cntt'
1630     jobs:
1631       - 'functest-{repo}-{container}-{tag}-trivy'
1632
1633 - project:
1634     name: 'functest'
1635     <<: *functest-params
1636     jobs:
1637       - 'functest-{tag}-docker'
1638
1639 - view:
1640     name: functest-docker
1641     view-type: list
1642     columns:
1643       - status
1644       - weather
1645       - job
1646       - last-success
1647       - last-failure
1648       - last-duration
1649     regex: ^functest-[a-z0-9.]+-docker$
1650
1651 - view:
1652     name: functest-trivy
1653     view-type: list
1654     columns:
1655       - status
1656       - weather
1657       - job
1658       - last-success
1659       - last-failure
1660       - last-duration
1661     regex: (?!functest-kubernetes)(?!functest-pi)^functest-[a-z-0-9.]+-trivy$