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