9e91d8ed088517063b28a0db4c6236c2000571a8
[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-ext:
849           failure: false
850           first-failure: true
851           fixed: true
852           recipients: cedric.ollivier@orange.com
853
854 - project:
855     name: 'functest-daily'
856     <<: *functest-params
857     jobs:
858       - 'functest-{tag}-daily'
859
860 - view:
861     name: functest
862     view-type: list
863     columns:
864       - status
865       - weather
866       - job
867       - last-success
868       - last-failure
869       - last-duration
870     regex: ^functest-[a-z0-9.]+-daily$
871
872 - functest-build-containers: &functest-build-containers
873     name: 'functest-build-containers'
874     <<: *functest-containers
875     ref_arg: '{ref_arg}'
876     path: '{path}'
877     build_args: '{build_args}'
878     from: '{from}'
879
880 - builder:
881     name: functest-build-containers
882     builders:
883       - shell: |
884           set +x
885           if [ "{repo}" = "_" ]; then
886             image={container}:{tag}
887           elif [ "{port}" = "None" ]; then
888             image={repo}/{container}:{tag}
889           else
890             image={repo}:{port}/{container}:{tag}
891           fi
892           build_args=""
893           if [ "{build_args}" != "None" ]; then
894             for i in $(echo {build_args} | tr -d '[]' |sed "s/, / /g" ); \
895               do build_args="--build-arg $i $build_args"; done
896           fi
897           if [ "{ref_arg}" != "None" ]; then
898             build_args="$build_args --build-arg {ref_arg}={ref}"
899           fi
900           cd {path}
901           if [ "{from}" != "None" ]; then
902               sed -i {from} Dockerfile
903           fi
904           sudo docker build $build_args \
905             --pull=false --no-cache --force-rm=true \
906             -t $image .
907
908 - scm:
909     name: functest-scm
910     scm:
911       - git:
912           url: 'https://gerrit.opnfv.org/gerrit/functest'
913           refspec: '+refs/heads/*:refs/remotes/origin/* +refs/changes/*:refs/changes/*'
914           branches:
915             - '{ref}'
916
917 - functest-dep: &functest-dep
918     name: 'functest-containers'
919     repo: '{repo}'
920     port: '{port}'
921     tag: '{tag}'
922     dependency: '{dependency}'
923
924 - builder:
925     name: functest-pull-dep-images
926     builders:
927       - shell: |
928           set +x
929           if [ "_" = "_" ]; then
930             image=alpine:{dependency}
931           elif [ "None" = "None" ]; then
932             image=_/alpine:{dependency}
933           else
934             image=_:/alpine:{dependency}
935           fi
936           sudo docker pull $image || true
937
938 - builder:
939     name: functest-remove-dep-images
940     builders:
941       - shell: |
942           set +x
943           if [ "_" = "_" ]; then
944             image=alpine:{dependency}
945           elif [ "" = "None" ]; then
946             image=_/alpine:{dependency}
947           else
948             image=_:/alpine:{dependency}
949           fi
950           sudo docker rmi $image || true
951
952 - job-template:
953     name: 'functest-{repo}-{tag}-dep-pull'
954     parameters:
955       - functest-slave:
956           slave: '{slave}'
957     builders:
958       - functest-pull-dep-images:
959           <<: *functest-dep
960
961 - project:
962     name: 'functest-{repo}-{tag}-dep-pull'
963     <<: *functest-params
964     jobs:
965       - 'functest-{repo}-{tag}-dep-pull'
966
967 - job-template:
968     name: 'functest-{repo}-{tag}-dep-rmi'
969     parameters:
970       - functest-slave:
971           slave: '{slave}'
972     builders:
973       - functest-remove-dep-images:
974           <<: *functest-dep
975
976 - project:
977     name: 'functest-{repo}-{tag}-dep-rmi'
978     <<: *functest-params
979     jobs:
980       - 'functest-{repo}-{tag}-dep-rmi'
981
982 - builder:
983     name: functest-tox
984     builders:
985       - shell: |
986           set +x
987           sudo apt-get -o DPkg::Lock::Timeout=300 update && \
988           sudo DEBIAN_FRONTEND=noninteractive apt-get \
989             -o DPkg::Lock::Timeout=300 dist-upgrade -y
990           sudo DEBIAN_FRONTEND=noninteractive \
991           apt-get -o DPkg::Lock::Timeout=300 install software-properties-common gpg -y
992           sudo add-apt-repository -y ppa:deadsnakes/ppa
993           sudo apt-get -o DPkg::Lock::Timeout=300 update && \
994           sudo DEBIAN_FRONTEND=noninteractive apt-get \
995             -o DPkg::Lock::Timeout=300 install \
996             python3.9 python3.9-dev python3.9-distutils \
997             python3.8 python3.8-dev python3.8-distutils \
998             python3.7 python3.7-dev python3.6 python3.6-dev \
999             python python-dev python3-pip enchant -y
1000           sudo pip3 install tox tox-pip-version
1001
1002           tox
1003
1004 - job-template:
1005     name: 'functest-{tag}-tox'
1006     scm:
1007       - functest-scm:
1008           ref: $GERRIT_REFSPEC
1009     triggers:
1010       - functest-patchset-created:
1011           branch: '{branch}'
1012     parameters:
1013       - functest-slave:
1014           slave: '{slave}'
1015     builders:
1016       - functest-tox:
1017
1018 - project:
1019     name: functest-tox
1020     <<: *functest-params
1021     jobs:
1022       - 'functest-{tag}-tox'
1023
1024 - job-template:
1025     name: 'functest-{repo}-{container}-{tag}-gate'
1026     parameters:
1027       - functest-slave:
1028           slave: '{slave}'
1029     scm:
1030       - functest-scm:
1031           ref: $GERRIT_REFSPEC
1032     builders:
1033       - functest-build-containers:
1034           <<: *functest-build-containers
1035           ref: $GERRIT_REFSPEC
1036           build_args: '{build_args}'
1037
1038 - project:
1039     name: functest-opnfv-functest-core-{tag}-gate
1040     <<: *functest-params
1041     container: functest-core
1042     ref_arg: BRANCH
1043     path: docker/core
1044     jobs:
1045       - 'functest-{repo}-{container}-{tag}-gate'
1046
1047 - project:
1048     name: functest-opnfv-functest-tempest-{tag}-gate
1049     <<: *functest-params
1050     container: functest-tempest
1051     ref_arg: BRANCH
1052     path: docker/tempest
1053     exclude:
1054       - {'tag': 'latest'}
1055       - {'tag': 'xena'}
1056       - {'tag': 'wallaby'}
1057       - {'tag': 'leguer'}
1058       - {'tag': 'kali'}
1059       - {'tag': 'jerma'}
1060     jobs:
1061       - 'functest-{repo}-{container}-{tag}-gate'
1062
1063 - project:
1064     name: functest-opnfv-functest-healthcheck-{tag}-gate
1065     <<: *functest-params
1066     container: functest-healthcheck
1067     ref_arg: BRANCH
1068     path: docker/healthcheck
1069     jobs:
1070       - 'functest-{repo}-{container}-{tag}-gate'
1071
1072 - project:
1073     name: functest-opnfv-functest-smoke-{tag}-gate
1074     <<: *functest-params
1075     container: functest-smoke
1076     ref_arg: BRANCH
1077     path: docker/smoke
1078     jobs:
1079       - 'functest-{repo}-{container}-{tag}-gate'
1080
1081 - project:
1082     name: functest-opnfv-functest-benchmarking-{tag}-gate
1083     <<: *functest-params
1084     container: functest-benchmarking
1085     ref_arg: BRANCH
1086     path: docker/benchmarking
1087     jobs:
1088       - 'functest-{repo}-{container}-{tag}-gate'
1089
1090 - project:
1091     name: functest-opnfv-functest-vnf-{tag}-gate
1092     <<: *functest-params
1093     container: functest-vnf
1094     ref_arg:
1095     path: docker/vnf
1096     jobs:
1097       - 'functest-{repo}-{container}-{tag}-gate'
1098
1099 - project:
1100     name: functest-opnfv-functest-smoke-cntt-{tag}-gate
1101     <<: *functest-params
1102     container: functest-smoke-cntt
1103     ref_arg: BRANCH
1104     path: docker/smoke-cntt
1105     jobs:
1106       - 'functest-{repo}-{container}-{tag}-gate'
1107
1108 - project:
1109     name: functest-opnfv-functest-benchmarking-cntt-{tag}-gate
1110     <<: *functest-params
1111     container: functest-benchmarking-cntt
1112     ref_arg: BRANCH
1113     path: docker/benchmarking-cntt
1114     jobs:
1115       - 'functest-{repo}-{container}-{tag}-gate'
1116
1117 - trigger:
1118     name: functest-patchset-created
1119     triggers:
1120       - gerrit:
1121           trigger-on:
1122             - patchset-created-event
1123             - comment-added-contains-event:
1124                 comment-contains-value: 'recheck'
1125             - comment-added-contains-event:
1126                 comment-contains-value: 'reverify'
1127           projects:
1128             - project-compare-type: 'ANT'
1129               project-pattern: 'functest'
1130               branches:
1131                 - branch-compare-type: 'ANT'
1132                   branch-pattern: '**/{branch}'
1133
1134 - job-template:
1135     name: 'functest-{tag}-review'
1136     project-type: multijob
1137     triggers:
1138       - functest-patchset-created:
1139           branch: '{branch}'
1140     parameters:
1141       - functest-slave:
1142           slave: '{slave}'
1143       - functest-build_tag:
1144           build_tag: ''
1145       - functest-EXTERNAL_NETWORK:
1146           EXTERNAL_NETWORK: public
1147       - functest-VOLUME_DEVICE_NAME:
1148           VOLUME_DEVICE_NAME: sdb
1149       - functest-IMAGE_PROPERTIES:
1150           IMAGE_PROPERTIES: hw_scsi_model:virtio-scsi,hw_disk_bus:scsi
1151     # PyYAML and yamllint differ here
1152     # see https://github.com/yaml/pyyaml/issues/234
1153     # yamllint disable rule:indentation
1154     properties:
1155       - build-blocker:
1156           blocking-jobs:
1157           - ^functest-(pi-)*{tag}-(daily|docker|review)$
1158     # yamllint enable rule:indentation
1159     builders:
1160       - multijob:
1161           name: remove former images
1162           projects:
1163             - name: 'functest-opnfv-functest-healthcheck-{tag}-rmi'
1164               <<: *functest-jobs
1165             - name: 'functest-opnfv-functest-smoke-{tag}-rmi'
1166               <<: *functest-jobs
1167             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-rmi'
1168               <<: *functest-jobs
1169             - name: 'functest-opnfv-functest-benchmarking-{tag}-rmi'
1170               <<: *functest-jobs
1171             - name: 'functest-opnfv-functest-benchmarking-cntt-{tag}-rmi'
1172               <<: *functest-jobs
1173             - name: 'functest-opnfv-functest-vnf-{tag}-rmi'
1174               <<: *functest-jobs
1175       - multijob:
1176           name: remove dependency
1177           projects:
1178             - name: 'functest-{repo}-{tag}-dep-rmi'
1179               <<: *functest-jobs
1180       - multijob:
1181           name: pull dependency
1182           projects:
1183             - name: 'functest-{repo}-{tag}-dep-pull'
1184               <<: *functest-jobs
1185       - multijob:
1186           name: build opnfv/functest-core
1187           projects:
1188             - name: 'functest-opnfv-functest-core-{tag}-gate'
1189               <<: *functest-jobs
1190       - multijob:
1191           name: build opnfv/functest-tempest
1192           projects:
1193             - name: 'functest-opnfv-functest-tempest-{tag}-gate'
1194               <<: *functest-jobs
1195       - multijob:
1196           name: build containers
1197           projects:
1198             - name: 'functest-opnfv-functest-healthcheck-{tag}-gate'
1199               <<: *functest-jobs
1200             - name: 'functest-opnfv-functest-smoke-{tag}-gate'
1201               <<: *functest-jobs
1202             - name: 'functest-opnfv-functest-benchmarking-{tag}-gate'
1203               <<: *functest-jobs
1204             - name: 'functest-opnfv-functest-vnf-{tag}-gate'
1205               <<: *functest-jobs
1206       - multijob:
1207           name: build cntt containers
1208           projects:
1209             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-gate'
1210               <<: *functest-jobs
1211             - name: 'functest-opnfv-functest-benchmarking-cntt-{tag}-gate'
1212               <<: *functest-jobs
1213       - multijob:
1214           name: opnfv/functest-healthcheck:{tag}
1215           projects:
1216             - name: 'functest-opnfv-functest-healthcheck-{tag}-connection_check-run'
1217               <<: *functest-jobs
1218             - name: 'functest-opnfv-functest-healthcheck-{tag}-tenantnetwork1-run'
1219               <<: *functest-jobs
1220             - name: 'functest-opnfv-functest-healthcheck-{tag}-tenantnetwork2-run'
1221               <<: *functest-jobs
1222             - name: 'functest-opnfv-functest-healthcheck-{tag}-vmready1-run'
1223               <<: *functest-jobs
1224             - name: 'functest-opnfv-functest-healthcheck-{tag}-vmready2-run'
1225               <<: *functest-jobs
1226             - name: 'functest-opnfv-functest-healthcheck-{tag}-singlevm1-run'
1227               <<: *functest-jobs
1228             - name: 'functest-opnfv-functest-healthcheck-{tag}-singlevm2-run'
1229               <<: *functest-jobs
1230             - name: 'functest-opnfv-functest-healthcheck-{tag}-vping_ssh-run'
1231               <<: *functest-jobs
1232             - name: 'functest-opnfv-functest-healthcheck-{tag}-vping_userdata-run'
1233               <<: *functest-jobs
1234             - name: 'functest-opnfv-functest-healthcheck-{tag}-cinder_test-run'
1235               <<: *functest-jobs
1236             - name: 'functest-opnfv-functest-healthcheck-{tag}-odl-run'
1237               <<: *functest-jobs
1238             - name: 'functest-opnfv-functest-healthcheck-{tag}-tempest_smoke-run'
1239               <<: *functest-jobs
1240             - name: 'functest-opnfv-functest-healthcheck-{tag}-tempest_horizon-run'
1241               <<: *functest-jobs
1242       - multijob:
1243           name: opnfv/functest-smoke:{tag}
1244           projects:
1245             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_neutron-run'
1246               <<: *functest-jobs
1247             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_cinder-run'
1248               <<: *functest-jobs
1249             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_keystone-run'
1250               <<: *functest-jobs
1251             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_heat-run'
1252               <<: *functest-jobs
1253             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_telemetry-run'
1254               <<: *functest-jobs
1255             - name: 'functest-opnfv-functest-smoke-{tag}-rally_sanity-run'
1256               <<: *functest-jobs
1257             - name: 'functest-opnfv-functest-smoke-{tag}-refstack_defcore-run'
1258               <<: *functest-jobs
1259             - name: 'functest-opnfv-functest-smoke-{tag}-refstack_compute-run'
1260               <<: *functest-jobs
1261             - name: 'functest-opnfv-functest-smoke-{tag}-refstack_object-run'
1262               <<: *functest-jobs
1263             - name: 'functest-opnfv-functest-smoke-{tag}-refstack_platform-run'
1264               <<: *functest-jobs
1265             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_full-run'
1266               <<: *functest-jobs
1267             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_scenario-run'
1268               <<: *functest-jobs
1269             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_slow-run'
1270               <<: *functest-jobs
1271             - name: 'functest-opnfv-functest-smoke-{tag}-patrole-run'
1272               <<: *functest-jobs
1273             - name: 'functest-opnfv-functest-smoke-{tag}-patrole_admin-run'
1274               <<: *functest-jobs
1275             - name: 'functest-opnfv-functest-smoke-{tag}-patrole_member-run'
1276               <<: *functest-jobs
1277             - name: 'functest-opnfv-functest-smoke-{tag}-patrole_reader-run'
1278               <<: *functest-jobs
1279             - name: 'functest-opnfv-functest-smoke-{tag}-networking-bgpvpn-run'
1280               <<: *functest-jobs
1281             - name: 'functest-opnfv-functest-smoke-{tag}-networking-sfc-run'
1282               <<: *functest-jobs
1283             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_barbican-run'
1284               <<: *functest-jobs
1285             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_octavia-run'
1286               <<: *functest-jobs
1287             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_cyborg-run'
1288               <<: *functest-jobs
1289       - multijob:
1290           name: opnfv/functest-smoke-cntt:{tag}
1291           projects:
1292             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-tempest_neutron_cntt-run'
1293               <<: *functest-jobs
1294             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-tempest_cinder_cntt-run'
1295               <<: *functest-jobs
1296             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-tempest_keystone_cntt-run'
1297               <<: *functest-jobs
1298             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-tempest_heat_cntt-run'
1299               <<: *functest-jobs
1300             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-rally_sanity_cntt-run'
1301               <<: *functest-jobs
1302             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-tempest_full_cntt-run'
1303               <<: *functest-jobs
1304             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-tempest_scenario_cntt-run'
1305               <<: *functest-jobs
1306             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-tempest_slow_cntt-run'
1307               <<: *functest-jobs
1308       - multijob:
1309           name: opnfv/functest-benchmarking:{tag}
1310           projects:
1311             - name: 'functest-opnfv-functest-benchmarking-{tag}-rally_full-run'
1312               <<: *functest-jobs
1313             - name: 'functest-opnfv-functest-benchmarking-{tag}-rally_jobs-run'
1314               <<: *functest-jobs
1315             - name: 'functest-opnfv-functest-benchmarking-{tag}-vmtp-run'
1316               <<: *functest-jobs
1317             - name: 'functest-opnfv-functest-benchmarking-{tag}-shaker-run'
1318               <<: *functest-jobs
1319       - multijob:
1320           name: opnfv/functest-benchmarking-cntt:{tag}
1321           projects:
1322             - name: 'functest-opnfv-functest-benchmarking-cntt-{tag}-rally_full_cntt-run'
1323               <<: *functest-jobs
1324             - name: 'functest-opnfv-functest-benchmarking-cntt-{tag}-rally_jobs_cntt-run'
1325               <<: *functest-jobs
1326       - multijob:
1327           name: opnfv/functest-vnf:{tag}
1328           projects:
1329             - name: 'functest-opnfv-functest-vnf-{tag}-cloudify-run'
1330               <<: *functest-jobs
1331             - name: 'functest-opnfv-functest-vnf-{tag}-cloudify_ims-run'
1332               <<: *functest-jobs
1333             - name: 'functest-opnfv-functest-vnf-{tag}-heat_ims-run'
1334               <<: *functest-jobs
1335             - name: 'functest-opnfv-functest-vnf-{tag}-vyos_vrouter-run'
1336               <<: *functest-jobs
1337             - name: 'functest-opnfv-functest-vnf-{tag}-juju_epc-run'
1338               <<: *functest-jobs
1339     publishers:
1340       - email-ext:
1341           failure: false
1342           first-failure: true
1343           fixed: true
1344           recipients: cedric.ollivier@orange.com
1345
1346 - project:
1347     name: 'functest-review'
1348     <<: *functest-params
1349     jobs:
1350       - 'functest-{tag}-review'
1351
1352 - view:
1353     name: functest-review
1354     view-type: list
1355     columns:
1356       - status
1357       - weather
1358       - job
1359       - last-success
1360       - last-failure
1361       - last-duration
1362     regex: ^functest-[a-z0-9.]+-review$
1363
1364 - view:
1365     name: functest-tox
1366     view-type: list
1367     columns:
1368       - status
1369       - weather
1370       - job
1371       - last-success
1372       - last-failure
1373       - last-duration
1374     regex: ^functest-[a-z0-9.]+-tox$
1375
1376 - builder:
1377     name: functest-push-containers
1378     builders:
1379       - shell: |
1380           set +x
1381           if [ "{repo}" = "_" ]; then
1382             image={container}:{tag}
1383           elif [ "{port}" = "None" ]; then
1384             image={repo}/{container}:{tag}
1385           else
1386             image={repo}:{port}/{container}:{tag}
1387           fi
1388           sudo docker push $image
1389
1390 - trigger:
1391     name: functest-commit
1392     triggers:
1393       - pollscm:
1394           cron: "*/30 * * * *"
1395
1396 - job-template:
1397     name: 'functest-{repo}-{container}-{tag}-build'
1398     parameters:
1399       - functest-slave:
1400           slave: '{slave}'
1401     scm:
1402       - functest-scm:
1403           ref: '{branch}'
1404     builders:
1405       - functest-build-containers:
1406           <<: *functest-build-containers
1407           ref: '{branch}'
1408           build_args: '{build_args}'
1409       - functest-push-containers:
1410           <<: *functest-build-containers
1411           ref: '{branch}'
1412
1413 - project:
1414     name: functest-opnfv-functest-core-{tag}-build
1415     <<: *functest-params
1416     container: functest-core
1417     ref_arg: BRANCH
1418     path: docker/core
1419     jobs:
1420       - 'functest-{repo}-{container}-{tag}-build'
1421
1422 - project:
1423     name: functest-opnfv-functest-tempest-{tag}-build
1424     <<: *functest-params
1425     container: functest-tempest
1426     ref_arg: BRANCH
1427     path: docker/tempest
1428     exclude:
1429       - {'tag': 'latest'}
1430       - {'tag': 'xena'}
1431       - {'tag': 'wallaby'}
1432       - {'tag': 'leguer'}
1433       - {'tag': 'kali'}
1434       - {'tag': 'jerma'}
1435     jobs:
1436       - 'functest-{repo}-{container}-{tag}-build'
1437
1438 - project:
1439     name: functest-opnfv-functest-healthcheck-{tag}-build
1440     <<: *functest-params
1441     container: functest-healthcheck
1442     ref_arg: BRANCH
1443     path: docker/healthcheck
1444     jobs:
1445       - 'functest-{repo}-{container}-{tag}-build'
1446
1447 - project:
1448     name: functest-opnfv-functest-smoke-{tag}-build
1449     <<: *functest-params
1450     container: functest-smoke
1451     ref_arg: BRANCH
1452     path: docker/smoke
1453     jobs:
1454       - 'functest-{repo}-{container}-{tag}-build'
1455
1456 - project:
1457     name: functest-opnfv-functest-benchmarking-{tag}-build
1458     <<: *functest-params
1459     container: functest-benchmarking
1460     ref_arg: BRANCH
1461     path: docker/benchmarking
1462     jobs:
1463       - 'functest-{repo}-{container}-{tag}-build'
1464
1465 - project:
1466     name: functest-opnfv-functest-vnf-{tag}-build
1467     <<: *functest-params
1468     container: functest-vnf
1469     ref_arg:
1470     path: docker/vnf
1471     jobs:
1472       - 'functest-{repo}-{container}-{tag}-build'
1473
1474 - project:
1475     name: functest-opnfv-functest-smoke-cntt-{tag}-build
1476     <<: *functest-params
1477     container: functest-smoke-cntt
1478     ref_arg: BRANCH
1479     path: docker/smoke-cntt
1480     jobs:
1481       - 'functest-{repo}-{container}-{tag}-build'
1482
1483 - project:
1484     name: functest-opnfv-functest-benchmarking-cntt-{tag}-build
1485     <<: *functest-params
1486     container: functest-benchmarking-cntt
1487     ref_arg: BRANCH
1488     path: docker/benchmarking-cntt
1489     jobs:
1490       - 'functest-{repo}-{container}-{tag}-build'
1491
1492 - job-template:
1493     name: 'functest-{tag}-docker'
1494     project-type: multijob
1495     triggers:
1496       - functest-commit
1497     scm:
1498       - functest-scm:
1499           ref: '{branch}'
1500     parameters:
1501       - functest-slave:
1502           slave: '{slave}'
1503     # PyYAML and yamllint differ here
1504     # see https://github.com/yaml/pyyaml/issues/234
1505     # yamllint disable rule:indentation
1506     properties:
1507       - build-blocker:
1508           blocking-jobs:
1509           - ^functest-(pi-)*{tag}-(daily|docker|review)$
1510     # yamllint enable rule:indentation
1511     builders:
1512       - multijob:
1513           name: remove dependency
1514           projects:
1515             - name: 'functest-{repo}-{tag}-dep-rmi'
1516               <<: *functest-jobs
1517       - multijob:
1518           name: pull dependency
1519           projects:
1520             - name: 'functest-{repo}-{tag}-dep-pull'
1521               <<: *functest-jobs
1522       - multijob:
1523           name: build opnfv/functest-core
1524           projects:
1525             - name: 'functest-opnfv-functest-core-{tag}-build'
1526               <<: *functest-jobs
1527       - multijob:
1528           name: build opnfv/functest-tempest
1529           projects:
1530             - name: 'functest-opnfv-functest-tempest-{tag}-build'
1531               <<: *functest-jobs
1532       - multijob:
1533           name: build containers
1534           projects:
1535             - name: 'functest-opnfv-functest-healthcheck-{tag}-build'
1536               <<: *functest-jobs
1537             - name: 'functest-opnfv-functest-smoke-{tag}-build'
1538               <<: *functest-jobs
1539             - name: 'functest-opnfv-functest-benchmarking-{tag}-build'
1540               <<: *functest-jobs
1541             - name: 'functest-opnfv-functest-vnf-{tag}-build'
1542               <<: *functest-jobs
1543       - multijob:
1544           name: build cntt containers
1545           projects:
1546             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-build'
1547               <<: *functest-jobs
1548             - name: 'functest-opnfv-functest-benchmarking-cntt-{tag}-build'
1549               <<: *functest-jobs
1550     publishers:
1551       - email-ext:
1552           failure: false
1553           first-failure: true
1554           fixed: true
1555           recipients: cedric.ollivier@orange.com
1556
1557 - builder:
1558     name: functest-trivy
1559     builders:
1560       - shell: |
1561           sudo apt-get -o DPkg::Lock::Timeout=300 update && \
1562           sudo DEBIAN_FRONTEND=noninteractive apt-get \
1563             -o DPkg::Lock::Timeout=300 install curl -y
1564
1565           curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sudo sh -s -- -b .
1566           if [ "{repo}" = "_" ]; then
1567             image={container}:{tag}
1568           elif [ "{port}" = "None" ]; then
1569             image={repo}/{container}:{tag}
1570           else
1571             image={repo}:{port}/{container}:{tag}
1572           fi
1573           ./trivy --exit-code 1 $image
1574
1575 - job-template:
1576     name: 'functest-{repo}-{container}-{tag}-trivy'
1577     triggers:
1578       - timed: '@weekly'
1579     parameters:
1580       - functest-slave:
1581           slave: '{slave}'
1582     builders:
1583       - functest-trivy:
1584           <<: *functest-containers
1585     publishers:
1586       - email-ext:
1587           failure: false
1588           first-failure: true
1589           fixed: true
1590           recipients: cedric.ollivier@orange.com
1591
1592 - project:
1593     name: 'functest-opnfv-functest-core-trivy'
1594     <<: *functest-params
1595     container: 'functest-core'
1596     jobs:
1597       - 'functest-{repo}-{container}-{tag}-trivy'
1598
1599 - project:
1600     name: 'functest-opnfv-functest-tempest-trivy'
1601     <<: *functest-params
1602     container: 'functest-tempest'
1603     jobs:
1604       - 'functest-{repo}-{container}-{tag}-trivy'
1605
1606 - project:
1607     name: 'functest-opnfv-functest-healthcheck-trivy'
1608     <<: *functest-params
1609     container: 'functest-healthcheck'
1610     jobs:
1611       - 'functest-{repo}-{container}-{tag}-trivy'
1612
1613 - project:
1614     name: 'functest-opnfv-functest-smoke-trivy'
1615     <<: *functest-params
1616     container: 'functest-smoke'
1617     jobs:
1618       - 'functest-{repo}-{container}-{tag}-trivy'
1619
1620 - project:
1621     name: 'functest-opnfv-functest-benchmarking-trivy'
1622     <<: *functest-params
1623     container: 'functest-benchmarking'
1624     jobs:
1625       - 'functest-{repo}-{container}-{tag}-trivy'
1626
1627 - project:
1628     name: 'functest-opnfv-functest-vnf-trivy'
1629     <<: *functest-params
1630     container: 'functest-vnf'
1631     jobs:
1632       - 'functest-{repo}-{container}-{tag}-trivy'
1633
1634 - project:
1635     name: 'functest-opnfv-functest-smoke-cntt-trivy'
1636     <<: *functest-params
1637     container: 'functest-smoke-cntt'
1638     jobs:
1639       - 'functest-{repo}-{container}-{tag}-trivy'
1640
1641 - project:
1642     name: 'functest-opnfv-functest-benchmarking-cntt-trivy'
1643     <<: *functest-params
1644     container: 'functest-benchmarking-cntt'
1645     jobs:
1646       - 'functest-{repo}-{container}-{tag}-trivy'
1647
1648 - builder:
1649     name: functest-grype
1650     builders:
1651       - shell: |
1652           sudo apt-get -o DPkg::Lock::Timeout=300 update && \
1653           sudo DEBIAN_FRONTEND=noninteractive apt-get \
1654             -o DPkg::Lock::Timeout=300 install curl -y
1655
1656           curl -sSfL https://raw.githubusercontent.com/anchore/grype/main/install.sh | sudo sh -s -- -b .
1657           if [ "{repo}" = "_" ]; then
1658             image={container}:{tag}
1659           elif [ "{port}" = "None" ]; then
1660             image={repo}/{container}:{tag}
1661           else
1662             image={repo}:{port}/{container}:{tag}
1663           fi
1664           ./grype -q $image
1665
1666 - job-template:
1667     name: 'functest-{repo}-{container}-{tag}-grype'
1668     triggers:
1669       - timed: '@weekly'
1670     parameters:
1671       - functest-slave:
1672           slave: '{slave}'
1673     builders:
1674       - functest-grype:
1675           <<: *functest-containers
1676     publishers:
1677       - email-ext:
1678           failure: false
1679           first-failure: true
1680           fixed: true
1681           recipients: cedric.ollivier@orange.com
1682
1683 - project:
1684     name: 'functest-opnfv-functest-core-grype'
1685     <<: *functest-params
1686     container: 'functest-core'
1687     jobs:
1688       - 'functest-{repo}-{container}-{tag}-grype'
1689
1690 - project:
1691     name: 'functest-opnfv-functest-tempest-grype'
1692     <<: *functest-params
1693     container: 'functest-tempest'
1694     jobs:
1695       - 'functest-{repo}-{container}-{tag}-grype'
1696
1697 - project:
1698     name: 'functest-opnfv-functest-healthcheck-grype'
1699     <<: *functest-params
1700     container: 'functest-healthcheck'
1701     jobs:
1702       - 'functest-{repo}-{container}-{tag}-grype'
1703
1704 - project:
1705     name: 'functest-opnfv-functest-smoke-grype'
1706     <<: *functest-params
1707     container: 'functest-smoke'
1708     jobs:
1709       - 'functest-{repo}-{container}-{tag}-grype'
1710
1711 - project:
1712     name: 'functest-opnfv-functest-benchmarking-grype'
1713     <<: *functest-params
1714     container: 'functest-benchmarking'
1715     jobs:
1716       - 'functest-{repo}-{container}-{tag}-grype'
1717
1718 - project:
1719     name: 'functest-opnfv-functest-vnf-grype'
1720     <<: *functest-params
1721     container: 'functest-vnf'
1722     jobs:
1723       - 'functest-{repo}-{container}-{tag}-grype'
1724
1725 - project:
1726     name: 'functest-opnfv-functest-smoke-cntt-grype'
1727     <<: *functest-params
1728     container: 'functest-smoke-cntt'
1729     jobs:
1730       - 'functest-{repo}-{container}-{tag}-grype'
1731
1732 - project:
1733     name: 'functest-opnfv-functest-benchmarking-cntt-grype'
1734     <<: *functest-params
1735     container: 'functest-benchmarking-cntt'
1736     jobs:
1737       - 'functest-{repo}-{container}-{tag}-grype'
1738
1739 - project:
1740     name: 'functest'
1741     <<: *functest-params
1742     jobs:
1743       - 'functest-{tag}-docker'
1744
1745 - view:
1746     name: functest-docker
1747     view-type: list
1748     columns:
1749       - status
1750       - weather
1751       - job
1752       - last-success
1753       - last-failure
1754       - last-duration
1755     regex: ^functest-[a-z0-9.]+-docker$
1756
1757 - view:
1758     name: functest-trivy
1759     view-type: list
1760     columns:
1761       - status
1762       - weather
1763       - job
1764       - last-success
1765       - last-failure
1766       - last-duration
1767     regex: (?!functest-kubernetes)(?!functest-pi)^functest-[a-z-0-9.]+-trivy$
1768
1769 - view:
1770     name: functest-grype
1771     view-type: list
1772     columns:
1773       - status
1774       - weather
1775       - job
1776       - last-success
1777       - last-failure
1778       - last-duration
1779     regex: (?!functest-kubernetes)(?!functest-pi)^functest-[a-z-0-9.]+-grype$