a166f8cc5a1ccfdfb2a0b43866459b4e240f220b
[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: wallaby
385         test: refstack_defcore
386       - tag: wallaby
387         test: networking-bgpvpn
388       - tag: wallaby
389         test: networking-sfc
390       - tag: wallaby
391         test: patrole
392       - tag: leguer
393         test: refstack_defcore
394       - tag: leguer
395         test: networking-bgpvpn
396       - tag: leguer
397         test: networking-sfc
398       - tag: leguer
399         test: patrole
400       - tag: kali
401         test: refstack_defcore
402       - tag: kali
403         test: networking-bgpvpn
404       - tag: kali
405         test: networking-sfc
406       - tag: kali
407         test: patrole_admin
408       - tag: kali
409         test: patrole_member
410       - tag: kali
411         test: patrole_reader
412       - tag: jerma
413         test: refstack_defcore
414       - tag: jerma
415         test: networking-bgpvpn
416       - tag: jerma
417         test: networking-sfc
418       - tag: jerma
419         test: patrole_admin
420       - tag: jerma
421         test: patrole_member
422       - tag: jerma
423         test: patrole_reader
424       - tag: jerma
425         test: tempest_cyborg
426     jobs:
427       - 'functest-opnfv-functest-smoke-{tag}-{test}-run'
428
429 - job-template:
430     name: 'functest-opnfv-functest-smoke-cntt-{tag}-{test}-run'
431     parameters:
432       - functest-slave:
433           slave: '{slave}'
434       - functest-build_tag:
435           build_tag: ''
436       - functest-EXTERNAL_NETWORK:
437           EXTERNAL_NETWORK: public
438       - functest-VOLUME_DEVICE_NAME:
439           VOLUME_DEVICE_NAME: sdb
440       - functest-IMAGE_PROPERTIES:
441           IMAGE_PROPERTIES: hw_scsi_model:virtio-scsi,hw_disk_bus:scsi
442     builders:
443       - functest-run-containers:
444           <<: *functest-run-containers
445
446 - project:
447     name: 'functest-opnfv-functest-smoke-cntt'
448     <<: *functest-params
449     volumes:
450       - /home/opnfv/functest/openstack.creds:/home/opnfv/functest/conf/env_file
451       - /home/opnfv/functest/images:/home/opnfv/functest/images
452     env:
453       - EXTERNAL_NETWORK=$EXTERNAL_NETWORK
454       - VOLUME_DEVICE_NAME=$VOLUME_DEVICE_NAME
455       - IMAGE_PROPERTIES=$IMAGE_PROPERTIES
456     container: 'functest-smoke-cntt'
457     test:
458       - tempest_neutron_cntt
459       - tempest_cinder_cntt
460       - tempest_keystone_cntt
461       - tempest_heat_cntt
462       - rally_sanity_cntt
463       - tempest_full_cntt
464       - tempest_scenario_cntt
465       - tempest_slow_cntt
466     privileged: 'false'
467     network: bridge
468     jobs:
469       - 'functest-opnfv-functest-smoke-cntt-{tag}-{test}-run'
470
471 - job-template:
472     name: 'functest-opnfv-functest-benchmarking-{tag}-{test}-run'
473     parameters:
474       - functest-slave:
475           slave: '{slave}'
476       - functest-build_tag:
477           build_tag: ''
478       - functest-EXTERNAL_NETWORK:
479           EXTERNAL_NETWORK: public
480       - functest-VOLUME_DEVICE_NAME:
481           VOLUME_DEVICE_NAME: sdb
482       - functest-IMAGE_PROPERTIES:
483           IMAGE_PROPERTIES: hw_scsi_model:virtio-scsi,hw_disk_bus:scsi
484     builders:
485       - functest-run-containers:
486           <<: *functest-run-containers
487
488 - project:
489     name: 'functest-opnfv-functest-benchmarking'
490     <<: *functest-params
491     volumes:
492       - /home/opnfv/functest/openstack.creds:/home/opnfv/functest/conf/env_file
493       - /home/opnfv/functest/images:/home/opnfv/functest/images
494     env:
495       - EXTERNAL_NETWORK=$EXTERNAL_NETWORK
496       - VOLUME_DEVICE_NAME=$VOLUME_DEVICE_NAME
497       - IMAGE_PROPERTIES=$IMAGE_PROPERTIES
498     container: 'functest-benchmarking'
499     test:
500       - rally_full
501       - rally_jobs
502       - vmtp
503       - shaker
504     privileged: 'false'
505     network: bridge
506     jobs:
507       - 'functest-opnfv-functest-benchmarking-{tag}-{test}-run'
508
509 - job-template:
510     name: 'functest-opnfv-functest-benchmarking-cntt-{tag}-{test}-run'
511     parameters:
512       - functest-slave:
513           slave: '{slave}'
514       - functest-build_tag:
515           build_tag: ''
516       - functest-EXTERNAL_NETWORK:
517           EXTERNAL_NETWORK: public
518       - functest-VOLUME_DEVICE_NAME:
519           VOLUME_DEVICE_NAME: sdb
520       - functest-IMAGE_PROPERTIES:
521           IMAGE_PROPERTIES: hw_scsi_model:virtio-scsi,hw_disk_bus:scsi
522     builders:
523       - functest-run-containers:
524           <<: *functest-run-containers
525
526 - project:
527     name: 'functest-opnfv-functest-benchmarking-cntt'
528     <<: *functest-params
529     volumes:
530       - /home/opnfv/functest/openstack.creds:/home/opnfv/functest/conf/env_file
531       - /home/opnfv/functest/images:/home/opnfv/functest/images
532     env:
533       - EXTERNAL_NETWORK=$EXTERNAL_NETWORK
534       - VOLUME_DEVICE_NAME=$VOLUME_DEVICE_NAME
535       - IMAGE_PROPERTIES=$IMAGE_PROPERTIES
536     container: 'functest-benchmarking-cntt'
537     test:
538       - rally_full_cntt
539       - rally_jobs_cntt
540     privileged: 'false'
541     network: bridge
542     jobs:
543       - 'functest-opnfv-functest-benchmarking-cntt-{tag}-{test}-run'
544
545 - job-template:
546     name: 'functest-opnfv-functest-vnf-{tag}-{test}-run'
547     parameters:
548       - functest-slave:
549           slave: '{slave}'
550       - functest-build_tag:
551           build_tag: ''
552       - functest-EXTERNAL_NETWORK:
553           EXTERNAL_NETWORK: public
554       - functest-VOLUME_DEVICE_NAME:
555           VOLUME_DEVICE_NAME: sdb
556       - functest-IMAGE_PROPERTIES:
557           IMAGE_PROPERTIES: hw_scsi_model:virtio-scsi,hw_disk_bus:scsi
558     builders:
559       - functest-run-containers:
560           <<: *functest-run-containers
561
562 - project:
563     name: 'functest-opnfv-functest-vnf'
564     <<: *functest-params
565     volumes:
566       - /home/opnfv/functest/openstack.creds:/home/opnfv/functest/conf/env_file
567       - /home/opnfv/functest/images:/home/opnfv/functest/images
568     env:
569       - EXTERNAL_NETWORK=$EXTERNAL_NETWORK
570       - VOLUME_DEVICE_NAME=$VOLUME_DEVICE_NAME
571       - IMAGE_PROPERTIES=$IMAGE_PROPERTIES
572     container: 'functest-vnf'
573     test:
574       - cloudify
575       - cloudify_ims
576       - heat_ims
577       - vyos_vrouter
578       - juju_epc
579     privileged: 'false'
580     network: bridge
581     jobs:
582       - 'functest-opnfv-functest-vnf-{tag}-{test}-run'
583
584 - builder:
585     name: functest-zip
586     builders:
587       - shell: |
588           set +x
589           volumes=;
590           if [ "{volumes}" != "None" ]; then
591             for i in $(echo {volumes} | tr -d '[]' |sed "s/, / /g" ); \
592               do volumes="-v $i $volumes"; done
593           fi
594           env=;
595           if [ "{env}" != "None" ]; then
596             for i in $(eval echo {env} | tr -d '[]' |sed "s/, / /g" ); \
597               do env="-e $i $env"; done
598           fi
599           [ ! -z "$WORKSPACE" ] && sudo rm -rf $WORKSPACE/results || true
600           if [ "{repo}" = "_" ]; then
601             image={container}:{tag}
602           elif [ "{port}" = "None" ]; then
603             image={repo}/{container}:{tag}
604           else
605             image={repo}:{port}/{container}:{tag}
606           fi
607           sudo docker run --rm \
608             $volumes \
609             $env \
610             -e S3_ENDPOINT_URL=https://storage.googleapis.com \
611             -e S3_DST_URL=s3://artifacts.opnfv.org/functest \
612             -e HTTP_DST_URL=http://artifacts.opnfv.org/functest \
613             -v /home/opnfv/functest/.boto:/root/.boto \
614             -e TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results \
615             -e TEST_DB_EXT_URL=http://testresults.opnfv.org/test/api/v1/results \
616             -e BUILD_TAG=$BUILD_TAG \
617             -v $WORKSPACE/../$JOB_NAME/results:/var/lib/xtesting/results \
618             $image zip_campaign
619
620 - job-template:
621     name: 'functest-{tag}-zip'
622     parameters:
623       - functest-slave:
624           slave: '{slave}'
625       - functest-build_tag:
626           build_tag: ''
627       - functest-EXTERNAL_NETWORK:
628           EXTERNAL_NETWORK: public
629       - functest-VOLUME_DEVICE_NAME:
630           VOLUME_DEVICE_NAME: sdb
631       - functest-IMAGE_PROPERTIES:
632           IMAGE_PROPERTIES: hw_scsi_model:virtio-scsi,hw_disk_bus:scsi
633     builders:
634       - functest-zip:
635           <<: *functest-containers
636           volumes: '{volumes}'
637           env: '{env}'
638
639 - project:
640     name: 'functest-{tag}-zip'
641     <<: *functest-params
642     volumes:
643       - /home/opnfv/functest/openstack.creds:/home/opnfv/functest/conf/env_file
644       - /home/opnfv/functest/images:/home/opnfv/functest/images
645     env:
646       - EXTERNAL_NETWORK=$EXTERNAL_NETWORK
647       - VOLUME_DEVICE_NAME=$VOLUME_DEVICE_NAME
648       - IMAGE_PROPERTIES=$IMAGE_PROPERTIES
649     container: 'functest-healthcheck'
650     jobs:
651       - 'functest-{tag}-zip'
652
653 - job-template:
654     name: 'functest-{tag}-daily'
655     project-type: multijob
656     triggers:
657       - timed: '@weekly'
658     parameters:
659       - functest-slave:
660           slave: '{slave}'
661       - functest-build_tag:
662           build_tag: ''
663       - functest-EXTERNAL_NETWORK:
664           EXTERNAL_NETWORK: public
665       - functest-VOLUME_DEVICE_NAME:
666           VOLUME_DEVICE_NAME: sdb
667       - functest-IMAGE_PROPERTIES:
668           IMAGE_PROPERTIES: hw_scsi_model:virtio-scsi,hw_disk_bus:scsi
669     # PyYAML and yamllint differ here
670     # see https://github.com/yaml/pyyaml/issues/234
671     # yamllint disable rule:indentation
672     properties:
673       - build-blocker:
674           blocking-jobs:
675           - ^functest-(pi-)*{tag}-(daily|docker|review)$
676     # yamllint enable rule:indentation
677     builders:
678       - multijob:
679           name: remove former images
680           projects:
681             - name: 'functest-opnfv-functest-healthcheck-{tag}-rmi'
682               <<: *functest-jobs
683             - name: 'functest-opnfv-functest-smoke-{tag}-rmi'
684               <<: *functest-jobs
685             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-rmi'
686               <<: *functest-jobs
687             - name: 'functest-opnfv-functest-benchmarking-{tag}-rmi'
688               <<: *functest-jobs
689             - name: 'functest-opnfv-functest-benchmarking-cntt-{tag}-rmi'
690               <<: *functest-jobs
691             - name: 'functest-opnfv-functest-vnf-{tag}-rmi'
692               <<: *functest-jobs
693       - multijob:
694           name: pull containers
695           projects:
696             - name: 'functest-opnfv-functest-healthcheck-{tag}-pull'
697               <<: *functest-jobs
698             - name: 'functest-opnfv-functest-smoke-{tag}-pull'
699               <<: *functest-jobs
700             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-pull'
701               <<: *functest-jobs
702             - name: 'functest-opnfv-functest-benchmarking-{tag}-pull'
703               <<: *functest-jobs
704             - name: 'functest-opnfv-functest-benchmarking-cntt-{tag}-pull'
705               <<: *functest-jobs
706             - name: 'functest-opnfv-functest-vnf-{tag}-pull'
707               <<: *functest-jobs
708       - multijob:
709           name: opnfv/functest-healthcheck:{tag}
710           projects:
711             - name: 'functest-opnfv-functest-healthcheck-{tag}-connection_check-run'
712               <<: *functest-jobs
713             - name: 'functest-opnfv-functest-healthcheck-{tag}-tenantnetwork1-run'
714               <<: *functest-jobs
715             - name: 'functest-opnfv-functest-healthcheck-{tag}-tenantnetwork2-run'
716               <<: *functest-jobs
717             - name: 'functest-opnfv-functest-healthcheck-{tag}-vmready1-run'
718               <<: *functest-jobs
719             - name: 'functest-opnfv-functest-healthcheck-{tag}-vmready2-run'
720               <<: *functest-jobs
721             - name: 'functest-opnfv-functest-healthcheck-{tag}-singlevm1-run'
722               <<: *functest-jobs
723             - name: 'functest-opnfv-functest-healthcheck-{tag}-singlevm2-run'
724               <<: *functest-jobs
725             - name: 'functest-opnfv-functest-healthcheck-{tag}-vping_ssh-run'
726               <<: *functest-jobs
727             - name: 'functest-opnfv-functest-healthcheck-{tag}-vping_userdata-run'
728               <<: *functest-jobs
729             - name: 'functest-opnfv-functest-healthcheck-{tag}-cinder_test-run'
730               <<: *functest-jobs
731             - name: 'functest-opnfv-functest-healthcheck-{tag}-odl-run'
732               <<: *functest-jobs
733             - name: 'functest-opnfv-functest-healthcheck-{tag}-tempest_smoke-run'
734               <<: *functest-jobs
735             - name: 'functest-opnfv-functest-healthcheck-{tag}-tempest_horizon-run'
736               <<: *functest-jobs
737       - multijob:
738           name: opnfv/functest-smoke:{tag}
739           projects:
740             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_neutron-run'
741               <<: *functest-jobs
742             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_cinder-run'
743               <<: *functest-jobs
744             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_keystone-run'
745               <<: *functest-jobs
746             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_heat-run'
747               <<: *functest-jobs
748             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_telemetry-run'
749               <<: *functest-jobs
750             - name: 'functest-opnfv-functest-smoke-{tag}-rally_sanity-run'
751               <<: *functest-jobs
752             - name: 'functest-opnfv-functest-smoke-{tag}-refstack_defcore-run'
753               <<: *functest-jobs
754             - name: 'functest-opnfv-functest-smoke-{tag}-refstack_compute-run'
755               <<: *functest-jobs
756             - name: 'functest-opnfv-functest-smoke-{tag}-refstack_object-run'
757               <<: *functest-jobs
758             - name: 'functest-opnfv-functest-smoke-{tag}-refstack_platform-run'
759               <<: *functest-jobs
760             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_full-run'
761               <<: *functest-jobs
762             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_scenario-run'
763               <<: *functest-jobs
764             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_slow-run'
765               <<: *functest-jobs
766             - name: 'functest-opnfv-functest-smoke-{tag}-patrole-run'
767               <<: *functest-jobs
768             - name: 'functest-opnfv-functest-smoke-{tag}-patrole_admin-run'
769               <<: *functest-jobs
770             - name: 'functest-opnfv-functest-smoke-{tag}-patrole_member-run'
771               <<: *functest-jobs
772             - name: 'functest-opnfv-functest-smoke-{tag}-patrole_reader-run'
773               <<: *functest-jobs
774             - name: 'functest-opnfv-functest-smoke-{tag}-networking-bgpvpn-run'
775               <<: *functest-jobs
776             - name: 'functest-opnfv-functest-smoke-{tag}-networking-sfc-run'
777               <<: *functest-jobs
778             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_barbican-run'
779               <<: *functest-jobs
780             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_octavia-run'
781               <<: *functest-jobs
782             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_cyborg-run'
783               <<: *functest-jobs
784       - multijob:
785           name: opnfv/functest-smoke-cntt:{tag}
786           projects:
787             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-tempest_neutron_cntt-run'
788               <<: *functest-jobs
789             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-tempest_cinder_cntt-run'
790               <<: *functest-jobs
791             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-tempest_keystone_cntt-run'
792               <<: *functest-jobs
793             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-tempest_heat_cntt-run'
794               <<: *functest-jobs
795             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-rally_sanity_cntt-run'
796               <<: *functest-jobs
797             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-tempest_full_cntt-run'
798               <<: *functest-jobs
799             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-tempest_scenario_cntt-run'
800               <<: *functest-jobs
801             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-tempest_slow_cntt-run'
802               <<: *functest-jobs
803       - multijob:
804           name: opnfv/functest-benchmarking:{tag}
805           projects:
806             - name: 'functest-opnfv-functest-benchmarking-{tag}-rally_full-run'
807               <<: *functest-jobs
808             - name: 'functest-opnfv-functest-benchmarking-{tag}-rally_jobs-run'
809               <<: *functest-jobs
810             - name: 'functest-opnfv-functest-benchmarking-{tag}-vmtp-run'
811               <<: *functest-jobs
812             - name: 'functest-opnfv-functest-benchmarking-{tag}-shaker-run'
813               <<: *functest-jobs
814       - multijob:
815           name: opnfv/functest-benchmarking-cntt:{tag}
816           projects:
817             - name: 'functest-opnfv-functest-benchmarking-cntt-{tag}-rally_full_cntt-run'
818               <<: *functest-jobs
819             - name: 'functest-opnfv-functest-benchmarking-cntt-{tag}-rally_jobs_cntt-run'
820               <<: *functest-jobs
821       - multijob:
822           name: opnfv/functest-vnf:{tag}
823           projects:
824             - name: 'functest-opnfv-functest-vnf-{tag}-cloudify-run'
825               <<: *functest-jobs
826             - name: 'functest-opnfv-functest-vnf-{tag}-cloudify_ims-run'
827               <<: *functest-jobs
828             - name: 'functest-opnfv-functest-vnf-{tag}-heat_ims-run'
829               <<: *functest-jobs
830             - name: 'functest-opnfv-functest-vnf-{tag}-vyos_vrouter-run'
831               <<: *functest-jobs
832             - name: 'functest-opnfv-functest-vnf-{tag}-juju_epc-run'
833               <<: *functest-jobs
834       - multijob:
835           name: dump all campaign data
836           projects:
837             - name: 'functest-{tag}-zip'
838               <<: *functest-jobs
839
840 - project:
841     name: 'functest-daily'
842     <<: *functest-params
843     jobs:
844       - 'functest-{tag}-daily'
845
846 - view:
847     name: functest
848     view-type: list
849     columns:
850       - status
851       - weather
852       - job
853       - last-success
854       - last-failure
855       - last-duration
856     regex: ^functest-[a-z0-9.]+-daily$
857
858 - functest-build-containers: &functest-build-containers
859     name: 'functest-build-containers'
860     <<: *functest-containers
861     ref_arg: '{ref_arg}'
862     path: '{path}'
863     build_args: '{build_args}'
864     from: '{from}'
865
866 - builder:
867     name: functest-build-containers
868     builders:
869       - shell: |
870           set +x
871           if [ "{repo}" = "_" ]; then
872             image={container}:{tag}
873           elif [ "{port}" = "None" ]; then
874             image={repo}/{container}:{tag}
875           else
876             image={repo}:{port}/{container}:{tag}
877           fi
878           build_args=""
879           if [ "{build_args}" != "None" ]; then
880             for i in $(echo {build_args} | tr -d '[]' |sed "s/, / /g" ); \
881               do build_args="--build-arg $i $build_args"; done
882           fi
883           if [ "{ref_arg}" != "None" ]; then
884             build_args="$build_args --build-arg {ref_arg}={ref}"
885           fi
886           cd {path}
887           if [ "{from}" != "None" ]; then
888               sed -i {from} Dockerfile
889           fi
890           sudo docker build $build_args \
891             --pull=false --no-cache --force-rm=true \
892             -t $image .
893
894 - scm:
895     name: functest-scm
896     scm:
897       - git:
898           url: 'https://gerrit.opnfv.org/gerrit/functest'
899           refspec: '+refs/heads/*:refs/remotes/origin/* +refs/changes/*:refs/changes/*'
900           branches:
901             - '{ref}'
902
903 - functest-dep: &functest-dep
904     name: 'functest-containers'
905     repo: '{repo}'
906     port: '{port}'
907     tag: '{tag}'
908     dependency: '{dependency}'
909
910 - builder:
911     name: functest-pull-dep-images
912     builders:
913       - shell: |
914           set +x
915           if [ "_" = "_" ]; then
916             image=alpine:{dependency}
917           elif [ "None" = "None" ]; then
918             image=_/alpine:{dependency}
919           else
920             image=_:/alpine:{dependency}
921           fi
922           sudo docker pull $image || true
923
924 - builder:
925     name: functest-remove-dep-images
926     builders:
927       - shell: |
928           set +x
929           if [ "_" = "_" ]; then
930             image=alpine:{dependency}
931           elif [ "" = "None" ]; then
932             image=_/alpine:{dependency}
933           else
934             image=_:/alpine:{dependency}
935           fi
936           sudo docker rmi $image || true
937
938 - job-template:
939     name: 'functest-{repo}-{tag}-dep-pull'
940     parameters:
941       - functest-slave:
942           slave: '{slave}'
943     builders:
944       - functest-pull-dep-images:
945           <<: *functest-dep
946
947 - project:
948     name: 'functest-{repo}-{tag}-dep-pull'
949     <<: *functest-params
950     jobs:
951       - 'functest-{repo}-{tag}-dep-pull'
952
953 - job-template:
954     name: 'functest-{repo}-{tag}-dep-rmi'
955     parameters:
956       - functest-slave:
957           slave: '{slave}'
958     builders:
959       - functest-remove-dep-images:
960           <<: *functest-dep
961
962 - project:
963     name: 'functest-{repo}-{tag}-dep-rmi'
964     <<: *functest-params
965     jobs:
966       - 'functest-{repo}-{tag}-dep-rmi'
967
968 - builder:
969     name: functest-tox
970     builders:
971       - shell: |
972           set +x
973           sudo apt-get update && \
974           sudo DEBIAN_FRONTEND=noninteractive apt-get dist-upgrade -y
975           sudo DEBIAN_FRONTEND=noninteractive \
976           apt-get install software-properties-common gpg -y
977           sudo add-apt-repository -y ppa:deadsnakes/ppa
978           sudo apt-get update && sudo DEBIAN_FRONTEND=noninteractive \
979           apt-get install \
980             python3.9 python3.9-dev python3.9-distutils \
981             python3.8 python3.8-dev python3.8-distutils \
982             python3.7 python3.7-dev python3.6 python3.6-dev \
983             python python-dev python3-pip enchant -y
984           sudo pip3 install tox tox-pip-version
985
986           tox
987
988 - job-template:
989     name: 'functest-{tag}-tox'
990     scm:
991       - functest-scm:
992           ref: $GERRIT_REFSPEC
993     triggers:
994       - functest-patchset-created:
995           branch: '{branch}'
996     parameters:
997       - functest-slave:
998           slave: '{slave}'
999     builders:
1000       - functest-tox:
1001
1002 - project:
1003     name: functest-tox
1004     <<: *functest-params
1005     jobs:
1006       - 'functest-{tag}-tox'
1007
1008 - job-template:
1009     name: 'functest-{repo}-{container}-{tag}-gate'
1010     parameters:
1011       - functest-slave:
1012           slave: '{slave}'
1013     scm:
1014       - functest-scm:
1015           ref: $GERRIT_REFSPEC
1016     builders:
1017       - functest-build-containers:
1018           <<: *functest-build-containers
1019           ref: $GERRIT_REFSPEC
1020           build_args: '{build_args}'
1021
1022 - project:
1023     name: functest-opnfv-functest-core-{tag}-gate
1024     <<: *functest-params
1025     container: functest-core
1026     ref_arg: BRANCH
1027     path: docker/core
1028     jobs:
1029       - 'functest-{repo}-{container}-{tag}-gate'
1030
1031 - project:
1032     name: functest-opnfv-functest-tempest-{tag}-gate
1033     <<: *functest-params
1034     container: functest-tempest
1035     ref_arg: BRANCH
1036     path: docker/tempest
1037     exclude:
1038       - {'tag': 'latest'}
1039       - {'tag': 'wallaby'}
1040       - {'tag': 'leguer'}
1041       - {'tag': 'kali'}
1042       - {'tag': 'jerma'}
1043     jobs:
1044       - 'functest-{repo}-{container}-{tag}-gate'
1045
1046 - project:
1047     name: functest-opnfv-functest-healthcheck-{tag}-gate
1048     <<: *functest-params
1049     container: functest-healthcheck
1050     ref_arg: BRANCH
1051     path: docker/healthcheck
1052     jobs:
1053       - 'functest-{repo}-{container}-{tag}-gate'
1054
1055 - project:
1056     name: functest-opnfv-functest-smoke-{tag}-gate
1057     <<: *functest-params
1058     container: functest-smoke
1059     ref_arg: BRANCH
1060     path: docker/smoke
1061     jobs:
1062       - 'functest-{repo}-{container}-{tag}-gate'
1063
1064 - project:
1065     name: functest-opnfv-functest-benchmarking-{tag}-gate
1066     <<: *functest-params
1067     container: functest-benchmarking
1068     ref_arg: BRANCH
1069     path: docker/benchmarking
1070     jobs:
1071       - 'functest-{repo}-{container}-{tag}-gate'
1072
1073 - project:
1074     name: functest-opnfv-functest-vnf-{tag}-gate
1075     <<: *functest-params
1076     container: functest-vnf
1077     ref_arg:
1078     path: docker/vnf
1079     jobs:
1080       - 'functest-{repo}-{container}-{tag}-gate'
1081
1082 - project:
1083     name: functest-opnfv-functest-smoke-cntt-{tag}-gate
1084     <<: *functest-params
1085     container: functest-smoke-cntt
1086     ref_arg: BRANCH
1087     path: docker/smoke-cntt
1088     jobs:
1089       - 'functest-{repo}-{container}-{tag}-gate'
1090
1091 - project:
1092     name: functest-opnfv-functest-benchmarking-cntt-{tag}-gate
1093     <<: *functest-params
1094     container: functest-benchmarking-cntt
1095     ref_arg: BRANCH
1096     path: docker/benchmarking-cntt
1097     jobs:
1098       - 'functest-{repo}-{container}-{tag}-gate'
1099
1100 - trigger:
1101     name: functest-patchset-created
1102     triggers:
1103       - gerrit:
1104           trigger-on:
1105             - patchset-created-event
1106             - comment-added-contains-event:
1107                 comment-contains-value: 'recheck'
1108             - comment-added-contains-event:
1109                 comment-contains-value: 'reverify'
1110           projects:
1111             - project-compare-type: 'ANT'
1112               project-pattern: 'functest'
1113               branches:
1114                 - branch-compare-type: 'ANT'
1115                   branch-pattern: '**/{branch}'
1116
1117 - job-template:
1118     name: 'functest-{tag}-review'
1119     project-type: multijob
1120     triggers:
1121       - functest-patchset-created:
1122           branch: '{branch}'
1123     parameters:
1124       - functest-slave:
1125           slave: '{slave}'
1126       - functest-build_tag:
1127           build_tag: ''
1128       - functest-EXTERNAL_NETWORK:
1129           EXTERNAL_NETWORK: public
1130       - functest-VOLUME_DEVICE_NAME:
1131           VOLUME_DEVICE_NAME: sdb
1132       - functest-IMAGE_PROPERTIES:
1133           IMAGE_PROPERTIES: hw_scsi_model:virtio-scsi,hw_disk_bus:scsi
1134     # PyYAML and yamllint differ here
1135     # see https://github.com/yaml/pyyaml/issues/234
1136     # yamllint disable rule:indentation
1137     properties:
1138       - build-blocker:
1139           blocking-jobs:
1140           - ^functest-(pi-)*{tag}-(daily|docker|review)$
1141     # yamllint enable rule:indentation
1142     builders:
1143       - multijob:
1144           name: remove former images
1145           projects:
1146             - name: 'functest-opnfv-functest-healthcheck-{tag}-rmi'
1147               <<: *functest-jobs
1148             - name: 'functest-opnfv-functest-smoke-{tag}-rmi'
1149               <<: *functest-jobs
1150             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-rmi'
1151               <<: *functest-jobs
1152             - name: 'functest-opnfv-functest-benchmarking-{tag}-rmi'
1153               <<: *functest-jobs
1154             - name: 'functest-opnfv-functest-benchmarking-cntt-{tag}-rmi'
1155               <<: *functest-jobs
1156             - name: 'functest-opnfv-functest-vnf-{tag}-rmi'
1157               <<: *functest-jobs
1158       - multijob:
1159           name: remove dependency
1160           projects:
1161             - name: 'functest-{repo}-{tag}-dep-rmi'
1162               <<: *functest-jobs
1163       - multijob:
1164           name: pull dependency
1165           projects:
1166             - name: 'functest-{repo}-{tag}-dep-pull'
1167               <<: *functest-jobs
1168       - multijob:
1169           name: build opnfv/functest-core
1170           projects:
1171             - name: 'functest-opnfv-functest-core-{tag}-gate'
1172               <<: *functest-jobs
1173       - multijob:
1174           name: build opnfv/functest-tempest
1175           projects:
1176             - name: 'functest-opnfv-functest-tempest-{tag}-gate'
1177               <<: *functest-jobs
1178       - multijob:
1179           name: build containers
1180           projects:
1181             - name: 'functest-opnfv-functest-healthcheck-{tag}-gate'
1182               <<: *functest-jobs
1183             - name: 'functest-opnfv-functest-smoke-{tag}-gate'
1184               <<: *functest-jobs
1185             - name: 'functest-opnfv-functest-benchmarking-{tag}-gate'
1186               <<: *functest-jobs
1187             - name: 'functest-opnfv-functest-vnf-{tag}-gate'
1188               <<: *functest-jobs
1189       - multijob:
1190           name: build cntt containers
1191           projects:
1192             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-gate'
1193               <<: *functest-jobs
1194             - name: 'functest-opnfv-functest-benchmarking-cntt-{tag}-gate'
1195               <<: *functest-jobs
1196       - multijob:
1197           name: opnfv/functest-healthcheck:{tag}
1198           projects:
1199             - name: 'functest-opnfv-functest-healthcheck-{tag}-connection_check-run'
1200               <<: *functest-jobs
1201             - name: 'functest-opnfv-functest-healthcheck-{tag}-tenantnetwork1-run'
1202               <<: *functest-jobs
1203             - name: 'functest-opnfv-functest-healthcheck-{tag}-tenantnetwork2-run'
1204               <<: *functest-jobs
1205             - name: 'functest-opnfv-functest-healthcheck-{tag}-vmready1-run'
1206               <<: *functest-jobs
1207             - name: 'functest-opnfv-functest-healthcheck-{tag}-vmready2-run'
1208               <<: *functest-jobs
1209             - name: 'functest-opnfv-functest-healthcheck-{tag}-singlevm1-run'
1210               <<: *functest-jobs
1211             - name: 'functest-opnfv-functest-healthcheck-{tag}-singlevm2-run'
1212               <<: *functest-jobs
1213             - name: 'functest-opnfv-functest-healthcheck-{tag}-vping_ssh-run'
1214               <<: *functest-jobs
1215             - name: 'functest-opnfv-functest-healthcheck-{tag}-vping_userdata-run'
1216               <<: *functest-jobs
1217             - name: 'functest-opnfv-functest-healthcheck-{tag}-cinder_test-run'
1218               <<: *functest-jobs
1219             - name: 'functest-opnfv-functest-healthcheck-{tag}-odl-run'
1220               <<: *functest-jobs
1221             - name: 'functest-opnfv-functest-healthcheck-{tag}-tempest_smoke-run'
1222               <<: *functest-jobs
1223             - name: 'functest-opnfv-functest-healthcheck-{tag}-tempest_horizon-run'
1224               <<: *functest-jobs
1225       - multijob:
1226           name: opnfv/functest-smoke:{tag}
1227           projects:
1228             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_neutron-run'
1229               <<: *functest-jobs
1230             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_cinder-run'
1231               <<: *functest-jobs
1232             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_keystone-run'
1233               <<: *functest-jobs
1234             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_heat-run'
1235               <<: *functest-jobs
1236             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_telemetry-run'
1237               <<: *functest-jobs
1238             - name: 'functest-opnfv-functest-smoke-{tag}-rally_sanity-run'
1239               <<: *functest-jobs
1240             - name: 'functest-opnfv-functest-smoke-{tag}-refstack_defcore-run'
1241               <<: *functest-jobs
1242             - name: 'functest-opnfv-functest-smoke-{tag}-refstack_compute-run'
1243               <<: *functest-jobs
1244             - name: 'functest-opnfv-functest-smoke-{tag}-refstack_object-run'
1245               <<: *functest-jobs
1246             - name: 'functest-opnfv-functest-smoke-{tag}-refstack_platform-run'
1247               <<: *functest-jobs
1248             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_full-run'
1249               <<: *functest-jobs
1250             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_scenario-run'
1251               <<: *functest-jobs
1252             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_slow-run'
1253               <<: *functest-jobs
1254             - name: 'functest-opnfv-functest-smoke-{tag}-patrole-run'
1255               <<: *functest-jobs
1256             - name: 'functest-opnfv-functest-smoke-{tag}-patrole_admin-run'
1257               <<: *functest-jobs
1258             - name: 'functest-opnfv-functest-smoke-{tag}-patrole_member-run'
1259               <<: *functest-jobs
1260             - name: 'functest-opnfv-functest-smoke-{tag}-patrole_reader-run'
1261               <<: *functest-jobs
1262             - name: 'functest-opnfv-functest-smoke-{tag}-networking-bgpvpn-run'
1263               <<: *functest-jobs
1264             - name: 'functest-opnfv-functest-smoke-{tag}-networking-sfc-run'
1265               <<: *functest-jobs
1266             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_barbican-run'
1267               <<: *functest-jobs
1268             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_octavia-run'
1269               <<: *functest-jobs
1270             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_cyborg-run'
1271               <<: *functest-jobs
1272       - multijob:
1273           name: opnfv/functest-smoke-cntt:{tag}
1274           projects:
1275             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-tempest_neutron_cntt-run'
1276               <<: *functest-jobs
1277             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-tempest_cinder_cntt-run'
1278               <<: *functest-jobs
1279             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-tempest_keystone_cntt-run'
1280               <<: *functest-jobs
1281             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-tempest_heat_cntt-run'
1282               <<: *functest-jobs
1283             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-rally_sanity_cntt-run'
1284               <<: *functest-jobs
1285             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-tempest_full_cntt-run'
1286               <<: *functest-jobs
1287             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-tempest_scenario_cntt-run'
1288               <<: *functest-jobs
1289             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-tempest_slow_cntt-run'
1290               <<: *functest-jobs
1291       - multijob:
1292           name: opnfv/functest-benchmarking:{tag}
1293           projects:
1294             - name: 'functest-opnfv-functest-benchmarking-{tag}-rally_full-run'
1295               <<: *functest-jobs
1296             - name: 'functest-opnfv-functest-benchmarking-{tag}-rally_jobs-run'
1297               <<: *functest-jobs
1298             - name: 'functest-opnfv-functest-benchmarking-{tag}-vmtp-run'
1299               <<: *functest-jobs
1300             - name: 'functest-opnfv-functest-benchmarking-{tag}-shaker-run'
1301               <<: *functest-jobs
1302       - multijob:
1303           name: opnfv/functest-benchmarking-cntt:{tag}
1304           projects:
1305             - name: 'functest-opnfv-functest-benchmarking-cntt-{tag}-rally_full_cntt-run'
1306               <<: *functest-jobs
1307             - name: 'functest-opnfv-functest-benchmarking-cntt-{tag}-rally_jobs_cntt-run'
1308               <<: *functest-jobs
1309       - multijob:
1310           name: opnfv/functest-vnf:{tag}
1311           projects:
1312             - name: 'functest-opnfv-functest-vnf-{tag}-cloudify-run'
1313               <<: *functest-jobs
1314             - name: 'functest-opnfv-functest-vnf-{tag}-cloudify_ims-run'
1315               <<: *functest-jobs
1316             - name: 'functest-opnfv-functest-vnf-{tag}-heat_ims-run'
1317               <<: *functest-jobs
1318             - name: 'functest-opnfv-functest-vnf-{tag}-vyos_vrouter-run'
1319               <<: *functest-jobs
1320             - name: 'functest-opnfv-functest-vnf-{tag}-juju_epc-run'
1321               <<: *functest-jobs
1322
1323 - project:
1324     name: 'functest-review'
1325     <<: *functest-params
1326     jobs:
1327       - 'functest-{tag}-review'
1328
1329 - view:
1330     name: functest-review
1331     view-type: list
1332     columns:
1333       - status
1334       - weather
1335       - job
1336       - last-success
1337       - last-failure
1338       - last-duration
1339     regex: ^functest-[a-z0-9.]+-review$
1340
1341 - view:
1342     name: functest-tox
1343     view-type: list
1344     columns:
1345       - status
1346       - weather
1347       - job
1348       - last-success
1349       - last-failure
1350       - last-duration
1351     regex: ^functest-[a-z0-9.]+-tox$
1352
1353 - builder:
1354     name: functest-push-containers
1355     builders:
1356       - shell: |
1357           set +x
1358           if [ "{repo}" = "_" ]; then
1359             image={container}:{tag}
1360           elif [ "{port}" = "None" ]; then
1361             image={repo}/{container}:{tag}
1362           else
1363             image={repo}:{port}/{container}:{tag}
1364           fi
1365           sudo docker push $image
1366
1367 - trigger:
1368     name: functest-commit
1369     triggers:
1370       - pollscm:
1371           cron: "*/30 * * * *"
1372
1373 - job-template:
1374     name: 'functest-{repo}-{container}-{tag}-build'
1375     parameters:
1376       - functest-slave:
1377           slave: '{slave}'
1378     scm:
1379       - functest-scm:
1380           ref: '{branch}'
1381     builders:
1382       - functest-build-containers:
1383           <<: *functest-build-containers
1384           ref: '{branch}'
1385           build_args: '{build_args}'
1386       - functest-push-containers:
1387           <<: *functest-build-containers
1388           ref: '{branch}'
1389
1390 - project:
1391     name: functest-opnfv-functest-core-{tag}-build
1392     <<: *functest-params
1393     container: functest-core
1394     ref_arg: BRANCH
1395     path: docker/core
1396     jobs:
1397       - 'functest-{repo}-{container}-{tag}-build'
1398
1399 - project:
1400     name: functest-opnfv-functest-tempest-{tag}-build
1401     <<: *functest-params
1402     container: functest-tempest
1403     ref_arg: BRANCH
1404     path: docker/tempest
1405     exclude:
1406       - {'tag': 'latest'}
1407       - {'tag': 'wallaby'}
1408       - {'tag': 'leguer'}
1409       - {'tag': 'kali'}
1410       - {'tag': 'jerma'}
1411     jobs:
1412       - 'functest-{repo}-{container}-{tag}-build'
1413
1414 - project:
1415     name: functest-opnfv-functest-healthcheck-{tag}-build
1416     <<: *functest-params
1417     container: functest-healthcheck
1418     ref_arg: BRANCH
1419     path: docker/healthcheck
1420     jobs:
1421       - 'functest-{repo}-{container}-{tag}-build'
1422
1423 - project:
1424     name: functest-opnfv-functest-smoke-{tag}-build
1425     <<: *functest-params
1426     container: functest-smoke
1427     ref_arg: BRANCH
1428     path: docker/smoke
1429     jobs:
1430       - 'functest-{repo}-{container}-{tag}-build'
1431
1432 - project:
1433     name: functest-opnfv-functest-benchmarking-{tag}-build
1434     <<: *functest-params
1435     container: functest-benchmarking
1436     ref_arg: BRANCH
1437     path: docker/benchmarking
1438     jobs:
1439       - 'functest-{repo}-{container}-{tag}-build'
1440
1441 - project:
1442     name: functest-opnfv-functest-vnf-{tag}-build
1443     <<: *functest-params
1444     container: functest-vnf
1445     ref_arg:
1446     path: docker/vnf
1447     jobs:
1448       - 'functest-{repo}-{container}-{tag}-build'
1449
1450 - project:
1451     name: functest-opnfv-functest-smoke-cntt-{tag}-build
1452     <<: *functest-params
1453     container: functest-smoke-cntt
1454     ref_arg: BRANCH
1455     path: docker/smoke-cntt
1456     jobs:
1457       - 'functest-{repo}-{container}-{tag}-build'
1458
1459 - project:
1460     name: functest-opnfv-functest-benchmarking-cntt-{tag}-build
1461     <<: *functest-params
1462     container: functest-benchmarking-cntt
1463     ref_arg: BRANCH
1464     path: docker/benchmarking-cntt
1465     jobs:
1466       - 'functest-{repo}-{container}-{tag}-build'
1467
1468 - job-template:
1469     name: 'functest-{tag}-docker'
1470     project-type: multijob
1471     triggers:
1472       - functest-commit
1473     scm:
1474       - functest-scm:
1475           ref: '{branch}'
1476     parameters:
1477       - functest-slave:
1478           slave: '{slave}'
1479     # PyYAML and yamllint differ here
1480     # see https://github.com/yaml/pyyaml/issues/234
1481     # yamllint disable rule:indentation
1482     properties:
1483       - build-blocker:
1484           blocking-jobs:
1485           - ^functest-(pi-)*{tag}-(daily|docker|review)$
1486     # yamllint enable rule:indentation
1487     builders:
1488       - multijob:
1489           name: remove dependency
1490           projects:
1491             - name: 'functest-{repo}-{tag}-dep-rmi'
1492               <<: *functest-jobs
1493       - multijob:
1494           name: pull dependency
1495           projects:
1496             - name: 'functest-{repo}-{tag}-dep-pull'
1497               <<: *functest-jobs
1498       - multijob:
1499           name: build opnfv/functest-core
1500           projects:
1501             - name: 'functest-opnfv-functest-core-{tag}-build'
1502               <<: *functest-jobs
1503       - multijob:
1504           name: build opnfv/functest-tempest
1505           projects:
1506             - name: 'functest-opnfv-functest-tempest-{tag}-build'
1507               <<: *functest-jobs
1508       - multijob:
1509           name: build containers
1510           projects:
1511             - name: 'functest-opnfv-functest-healthcheck-{tag}-build'
1512               <<: *functest-jobs
1513             - name: 'functest-opnfv-functest-smoke-{tag}-build'
1514               <<: *functest-jobs
1515             - name: 'functest-opnfv-functest-benchmarking-{tag}-build'
1516               <<: *functest-jobs
1517             - name: 'functest-opnfv-functest-vnf-{tag}-build'
1518               <<: *functest-jobs
1519       - multijob:
1520           name: build cntt containers
1521           projects:
1522             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-build'
1523               <<: *functest-jobs
1524             - name: 'functest-opnfv-functest-benchmarking-cntt-{tag}-build'
1525               <<: *functest-jobs
1526
1527 - builder:
1528     name: functest-trivy
1529     builders:
1530       - shell: |
1531           sudo apt-get update && sudo DEBIAN_FRONTEND=noninteractive \
1532           apt-get install curl -y
1533
1534           curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sudo sh -s -- -b .
1535           if [ "{repo}" = "_" ]; then
1536             image={container}:{tag}
1537           elif [ "{port}" = "None" ]; then
1538             image={repo}/{container}:{tag}
1539           else
1540             image={repo}:{port}/{container}:{tag}
1541           fi
1542           ./trivy --exit-code 1 $image
1543
1544 - job-template:
1545     name: 'functest-{repo}-{container}-{tag}-trivy'
1546     triggers:
1547       - timed: '@weekly'
1548     parameters:
1549       - functest-slave:
1550           slave: '{slave}'
1551     builders:
1552       - functest-trivy:
1553           <<: *functest-containers
1554
1555 - project:
1556     name: 'functest-opnfv-functest-core-trivy'
1557     <<: *functest-params
1558     container: 'functest-core'
1559     jobs:
1560       - 'functest-{repo}-{container}-{tag}-trivy'
1561
1562 - project:
1563     name: 'functest-opnfv-functest-tempest-trivy'
1564     <<: *functest-params
1565     container: 'functest-tempest'
1566     jobs:
1567       - 'functest-{repo}-{container}-{tag}-trivy'
1568
1569 - project:
1570     name: 'functest-opnfv-functest-healthcheck-trivy'
1571     <<: *functest-params
1572     container: 'functest-healthcheck'
1573     jobs:
1574       - 'functest-{repo}-{container}-{tag}-trivy'
1575
1576 - project:
1577     name: 'functest-opnfv-functest-smoke-trivy'
1578     <<: *functest-params
1579     container: 'functest-smoke'
1580     jobs:
1581       - 'functest-{repo}-{container}-{tag}-trivy'
1582
1583 - project:
1584     name: 'functest-opnfv-functest-benchmarking-trivy'
1585     <<: *functest-params
1586     container: 'functest-benchmarking'
1587     jobs:
1588       - 'functest-{repo}-{container}-{tag}-trivy'
1589
1590 - project:
1591     name: 'functest-opnfv-functest-vnf-trivy'
1592     <<: *functest-params
1593     container: 'functest-vnf'
1594     jobs:
1595       - 'functest-{repo}-{container}-{tag}-trivy'
1596
1597 - project:
1598     name: 'functest-opnfv-functest-smoke-cntt-trivy'
1599     <<: *functest-params
1600     container: 'functest-smoke-cntt'
1601     jobs:
1602       - 'functest-{repo}-{container}-{tag}-trivy'
1603
1604 - project:
1605     name: 'functest-opnfv-functest-benchmarking-cntt-trivy'
1606     <<: *functest-params
1607     container: 'functest-benchmarking-cntt'
1608     jobs:
1609       - 'functest-{repo}-{container}-{tag}-trivy'
1610
1611 - project:
1612     name: 'functest'
1613     <<: *functest-params
1614     jobs:
1615       - 'functest-{tag}-docker'
1616
1617 - view:
1618     name: functest-docker
1619     view-type: list
1620     columns:
1621       - status
1622       - weather
1623       - job
1624       - last-success
1625       - last-failure
1626       - last-duration
1627     regex: ^functest-[a-z0-9.]+-docker$
1628
1629 - view:
1630     name: functest-trivy
1631     view-type: list
1632     columns:
1633       - status
1634       - weather
1635       - job
1636       - last-success
1637       - last-failure
1638       - last-duration
1639     regex: (?!functest-kubernetes)(?!functest-pi)^functest-[a-z-0-9.]+-trivy$