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