Merge "Add packer-verify-build jobs"
[releng/global-jjb.git] / jjb / lf-ci-jobs.yaml
1 ---
2 ####################
3 # COMMON FUNCTIONS #
4 ####################
5
6 - builder:
7     name: lf-infra-jjbini
8     builders:
9       - config-file-provider:
10           files:
11             - file-id: jjbini
12               target: "$HOME/.config/jenkins_jobs/jenkins_jobs.ini"
13
14 - lf_packer: &lf_packer_common
15     name: lf-packer-common
16     # Provide configuration common in packer jobs.
17
18     ######################
19     # Default parameters #
20     ######################
21
22     branch: master
23     build-timeout: 90
24     cron: "@monthly"
25     disable-job: false
26     github-url: "https://github.com"
27     stream: master
28     submodule-recursive: true
29     submodule-timeout: 10
30     submodule-disable: false
31     packer-cloud-settings: packer-cloud-env
32     packer-version: 1.4.2
33
34     #####################
35     # Job Configuration #
36     #####################
37
38     project-type: freestyle
39     node: "{build-node}"
40     disabled: "{disable-job}"
41
42     properties:
43       - lf-infra-properties:
44           project: "{project}"
45           build-days-to-keep: 7
46
47     parameters:
48       - lf-infra-parameters:
49           project: "{project}"
50           stream: "{stream}"
51           branch: "{branch}"
52       - lf-packer-parameters:
53           packer-version: "{packer-version}"
54
55     wrappers:
56       - lf-infra-wrappers:
57           build-timeout: "{build-timeout}"
58           jenkins-ssh-credential: "{jenkins-ssh-credential}"
59
60     publishers:
61       - lf-infra-publish
62
63 - parameter:
64     name: lf-infra-jjb-parameters
65     parameters:
66       - string:
67           name: JJB_VERSION
68           default: "{jjb-version}"
69           description: Jenkins Job Builder version to download and install.
70       - string:
71           name: XDG_CACHE_HOME
72           default: "{jjb-cache}"
73           description: Jenkins Job Builder cache location.
74
75 - parameter:
76     name: lf-packer-parameters
77     parameters:
78       - string:
79           name: PACKER_VERSION
80           default: "{packer-version}"
81           description: Packer version to download and install.
82
83 - parameter:
84     name: lf-puppet-parameters
85     parameters:
86       - string:
87           name: PUPPET_LINT_VERSION
88           default: "{puppet-lint-version}"
89           description: Puppet-lint version to download and install.
90
91 - lf_jjb_common: &lf_jjb_common
92     name: lf-jjb-common
93
94     ######################
95     # Default parameters #
96     ######################
97
98     branch: master
99     build-timeout: 10
100     disable-job: false
101     github-url: "https://github.com"
102     jjb-cache: "$HOME/.cache/jenkins_jobs"
103     jjb-version: 2.8.0
104     stream: master
105     submodule-recursive: true
106     submodule-timeout: 10
107     submodule-disable: false
108     throttle_categories: []
109     throttle-enabled: false
110     throttle-max-per-node: 1
111     throttle-max-total: 0
112     throttle-option: "project"
113
114     gerrit_trigger_file_paths:
115       - compare-type: REG_EXP
116         pattern: "jjb/.*"
117       - compare-type: REG_EXP
118         pattern: "global-jjb"
119       - compare-type: REG_EXP
120         pattern: "shell/.*"
121
122     # github_included_regions MUST match gerrit_trigger_file_paths
123     github_included_regions:
124       - "jjb/.*"
125       - "global-jjb"
126       - "shell/.*"
127
128     #####################
129     # Job Configuration #
130     #####################
131
132     project-type: freestyle
133     node: "{build-node}"
134     disabled: "{disable-job}"
135
136     properties:
137       - lf-infra-properties:
138           project: "{project}"
139           build-days-to-keep: 7
140       - throttle:
141           categories: "{obj:throttle_categories}"
142           enabled: "{throttle-enabled}"
143           max-per-node: "{throttle-max-per-node}"
144           max-total: "{throttle-max-total}"
145           option: "{throttle-option}"
146
147     parameters:
148       - lf-infra-parameters:
149           project: "{project}"
150           stream: "{stream}"
151           branch: "{branch}"
152       - lf-infra-jjb-parameters:
153           jjb-cache: "{jjb-cache}"
154           jjb-version: "{jjb-version}"
155
156     wrappers:
157       - lf-infra-wrappers:
158           build-timeout: "{build-timeout}"
159           jenkins-ssh-credential: "{jenkins-ssh-credential}"
160
161     publishers:
162       - lf-infra-publish
163
164 ######################
165 # Gerrit Branch Lock #
166 ######################
167
168 - job-template:
169     name: "{project-name}-gerrit-branch-lock"
170     id: gerrit-branch-lock
171
172     ######################
173     # Default parameters #
174     ######################
175
176     branch: "**"
177     disable-job: false
178     git-url: "$GIT_URL/$GERRIT_PROJECT"
179     submodule-timeout: 10
180     submodule-disable: true
181     gerrit_merge_triggers:
182       - comment-added-contains-event:
183           comment-contains-value: (un)?lock branch$
184
185     #####################
186     # Job Configuration #
187     #####################
188
189     project-type: freestyle
190     node: "{build-node}"
191     disabled: "{disable-job}"
192
193     properties:
194       - lf-infra-properties:
195           project: "{project}"
196           build-days-to-keep: 1
197
198     parameters:
199       - lf-infra-parameters:
200           project: "{project}"
201           stream: ""
202           branch: "{branch}"
203
204     wrappers:
205       - lf-infra-wrappers:
206           build-timeout: 5
207           jenkins-ssh-credential: "{jenkins-ssh-credential}"
208
209     scm:
210       - lf-infra-gerrit-scm:
211           git-url: "{git-url}"
212           refspec: ""
213           branch: "$GERRIT_BRANCH"
214           submodule-recursive: false
215           submodule-timeout: "{submodule-timeout}"
216           submodule-disable: "{submodule-disable}"
217           choosing-strategy: default
218           jenkins-ssh-credential: "{jenkins-ssh-credential}"
219
220     triggers:
221       - gerrit:
222           server-name: "{gerrit-server-name}"
223           trigger-on: "{obj:gerrit_merge_triggers}"
224           projects:
225             - project-compare-type: ANT
226               project-pattern: "**"
227               branches:
228                 - branch-compare-type: ANT
229                   branch-pattern: "**/{branch}"
230
231     builders:
232       - shell: !include-raw-escape: ../shell/gerrit-branch-lock.sh
233
234     publishers:
235       - lf-infra-publish
236
237 ##########################################
238 # Jenkins Configuration Management Merge #
239 ##########################################
240
241 - builder:
242     name: lf-jenkins-cfg-clouds
243     builders:
244       - lf-infra-jjbini
245       - inject:
246           properties-content: "jenkins_silos={jenkins-silos}"
247       - shell: !include-raw-escape: ../shell/jenkins-configure-clouds.sh
248       - shell: rm -f "$HOME/.config/jenkins_jobs/jenkins_jobs.ini"
249
250 - builder:
251     name: lf-jenkins-cfg-global-vars
252     builders:
253       - lf-infra-jjbini
254       - inject:
255           properties-content: "jenkins_silos={jenkins-silos}"
256       - shell: !include-raw-escape: ../shell/jenkins-configure-global-vars.sh
257       - shell: rm -f "$HOME/.config/jenkins_jobs/jenkins_jobs.ini"
258
259 - lf_jenkins_configuration: &lf_jenkins_cfg_merge
260     name: lf-jenkins-cfg-merge
261
262     ######################
263     # Default parameters #
264     ######################
265
266     branch: master
267     cron: "@daily"
268     disable-job: false
269     git-url: "$GIT_URL/$GERRIT_PROJECT"
270     github-url: "https://github.com"
271     jenkins-silos: production sandbox
272     submodule-timeout: 10
273     submodule-disable: false
274
275     gerrit_merge_triggers:
276       - change-merged-event
277       - comment-added-contains-event:
278           comment-contains-value: '^Patch Set\s+\d+:\s+remerge\s*$'
279
280     gerrit_trigger_file_paths:
281       - compare-type: REG_EXP
282         pattern: 'jenkins-config\/.*'
283
284     # github_included_regions MUST match gerrit_trigger_file_paths
285     github_included_regions:
286       - 'jenkins-config\/.*'
287
288     #####################
289     # Job Configuration #
290     #####################
291
292     project-type: freestyle
293     node: "{build-node}"
294     concurrent: false
295     disabled: "{disable-job}"
296
297     properties:
298       - lf-infra-properties:
299           project: "{project}"
300           build-days-to-keep: 1
301
302     parameters:
303       - lf-infra-parameters:
304           project: "{project}"
305           stream: ""
306           branch: master
307
308     wrappers:
309       - lf-infra-wrappers:
310           build-timeout: 10
311           jenkins-ssh-credential: "{jenkins-ssh-credential}"
312
313     builders:
314       - lf-infra-pre-build
315       - lf-jenkins-cfg-global-vars:
316           jenkins-silos: "{jenkins-silos}"
317       - lf-jenkins-cfg-clouds:
318           jenkins-silos: "{jenkins-silos}"
319
320     publishers:
321       - lf-infra-publish
322
323 - job-template:
324     name: "{project-name}-jenkins-cfg-merge"
325     id: gerrit-jenkins-cfg-merge
326     <<: *lf_jenkins_cfg_merge
327
328     scm:
329       - lf-infra-gerrit-scm:
330           git-url: "{git-url}"
331           refspec: "refs/heads/{branch}"
332           branch: "{branch}"
333           submodule-recursive: true
334           submodule-timeout: "{submodule-timeout}"
335           submodule-disable: "{submodule-disable}"
336           choosing-strategy: default
337           jenkins-ssh-credential: "{jenkins-ssh-credential}"
338
339     triggers:
340       - timed: "{obj:cron}"
341       - gerrit:
342           server-name: "{gerrit-server-name}"
343           trigger-on: "{obj:gerrit_merge_triggers}"
344           projects:
345             - project-compare-type: ANT
346               project-pattern: "{project}"
347               branches:
348                 - branch-compare-type: ANT
349                   branch-pattern: "**/{branch}"
350               file-paths: "{obj:gerrit_trigger_file_paths}"
351
352 - job-template:
353     name: "{project-name}-jenkins-cfg-merge"
354     id: github-jenkins-cfg-merge
355     <<: *lf_jenkins_cfg_merge
356
357     properties:
358       - lf-infra-properties:
359           project: "{project}"
360           build-days-to-keep: 1
361       - github:
362           url: "{github-url}/{github-org}/{project}"
363
364     scm:
365       - lf-infra-github-scm:
366           url: "{git-clone-url}{github-org}/{project}"
367           refspec: ""
368           branch: "refs/heads/{branch}"
369           submodule-recursive: true
370           submodule-timeout: "{submodule-timeout}"
371           submodule-disable: "{submodule-disable}"
372           choosing-strategy: default
373           jenkins-ssh-credential: "{jenkins-ssh-credential}"
374
375     triggers:
376       - timed: "{obj:cron}"
377       - github
378       - pollscm:
379           cron: ""
380       - github-pull-request:
381           trigger-phrase: "^remerge$"
382           only-trigger-phrase: true
383           status-context: "Jenkins CFG Merge"
384           permit-all: true
385           github-hooks: true
386           org-list:
387             - "{github-org}"
388           white-list: "{obj:github_pr_whitelist}"
389           admin-list: "{obj:github_pr_admin_list}"
390           included-regions: "{obj:github_included_regions}"
391           white-list-target-branches:
392             - "{branch}"
393
394 ###########################################
395 # Jenkins Configuration Management Verify #
396 ###########################################
397
398 - lf_jenkins_configuration: &lf_jenkins_cfg_verify
399     name: lf-jenkins-cfg-verify
400
401     ######################
402     # Default parameters #
403     ######################
404
405     branch: master
406     build-days-to-keep: 7
407     disable-job: false
408     git-url: "$GIT_URL/$GERRIT_PROJECT"
409     github-url: "https://github.com"
410     submodule-timeout: 10
411     submodule-disable: false
412
413     gerrit_verify_triggers:
414       - patchset-created-event:
415           exclude-drafts: true
416           exclude-trivial-rebase: false
417           exclude-no-code-change: false
418       - draft-published-event
419       - comment-added-contains-event:
420           comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
421
422     gerrit_trigger_file_paths:
423       - compare-type: REG_EXP
424         pattern: 'jenkins-config\/.*'
425
426     # github_included_regions MUST match gerrit_trigger_file_paths
427     github_included_regions:
428       - 'jenkins-config\/.*'
429
430     #####################
431     # Job Configuration #
432     #####################
433
434     project-type: freestyle
435     node: "{build-node}"
436     concurrent: true
437     disabled: "{disable-job}"
438
439     properties:
440       - lf-infra-properties:
441           project: "{project}"
442           build-days-to-keep: 1
443
444     parameters:
445       - lf-infra-parameters:
446           project: "{project}"
447           stream: ""
448           branch: master
449
450     wrappers:
451       - lf-infra-wrappers:
452           build-timeout: 10
453           jenkins-ssh-credential: "{jenkins-ssh-credential}"
454       - config-file-provider:
455           # Listed after to override openstack-infra-wrappers clouds.yaml
456           # definition
457           files:
458             - file-id: clouds-yaml
459               target: "$HOME/.config/openstack/clouds.yaml"
460             - file-id: npmrc
461               target: "$HOME/.npmrc"
462             - file-id: pipconf
463               target: "$HOME/.config/pip/pip.conf"
464
465     builders:
466       - lf-infra-pre-build
467       - shell: !include-raw-escape: ../shell/jenkins-verify-images.sh
468
469     publishers:
470       - lf-infra-publish
471
472 - job-template:
473     name: "{project-name}-jenkins-cfg-verify"
474     id: gerrit-jenkins-cfg-verify
475     <<: *lf_jenkins_cfg_verify
476
477     scm:
478       - lf-infra-gerrit-scm:
479           git-url: "{git-url}"
480           refspec: "$GERRIT_REFSPEC"
481           branch: "$GERRIT_BRANCH"
482           submodule-recursive: true
483           submodule-timeout: "{submodule-timeout}"
484           submodule-disable: "{submodule-disable}"
485           choosing-strategy: gerrit
486           jenkins-ssh-credential: "{jenkins-ssh-credential}"
487
488     triggers:
489       - gerrit:
490           server-name: "{gerrit-server-name}"
491           trigger-on: "{obj:gerrit_verify_triggers}"
492           projects:
493             - project-compare-type: ANT
494               project-pattern: "{project}"
495               branches:
496                 - branch-compare-type: ANT
497                   branch-pattern: "**/{branch}"
498               file-paths: "{obj:gerrit_trigger_file_paths}"
499
500 - job-template:
501     name: "{project-name}-jenkins-cfg-verify"
502     id: github-jenkins-cfg-verify
503     <<: *lf_jenkins_cfg_verify
504
505     properties:
506       - github:
507           url: "{github-url}/{github-org}/{project}"
508
509     scm:
510       - lf-infra-github-scm:
511           url: "{git-clone-url}{github-org}/{project}"
512           refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
513           branch: "$sha1"
514           submodule-recursive: true
515           submodule-timeout: "{submodule-timeout}"
516           submodule-disable: "{submodule-disable}"
517           choosing-strategy: default
518           jenkins-ssh-credential: "{jenkins-ssh-credential}"
519
520     triggers:
521       - github-pull-request:
522           trigger-phrase: "^(recheck|reverify)$"
523           only-trigger-phrase: false
524           status-context: "Jenkins CFG Verify"
525           permit-all: true
526           github-hooks: true
527           included-regions: "{obj:github_included_regions}"
528           white-list-target-branches:
529             - "{branch}"
530
531 ###########################
532 # JENKINS SANDBOX CLEANUP #
533 ###########################
534
535 - lf_jenkins_sandbox_cleanup: &lf_jenkins_sandbox_cleanup
536     name: lf-jenkins-sandbox-cleanup
537
538     ######################
539     # Default parameters #
540     ######################
541
542     build-timeout: 30
543     # Run every Saturday at 08:00 UTC
544     cron: "0 8 * * 6"
545     disable-job: false
546
547     #####################
548     # Job Configuration #
549     #####################
550
551     project-type: freestyle
552     node: "{build-node}"
553     concurrent: true
554     disabled: "{disable-job}"
555
556     parameters:
557       - lf-infra-jjb-parameters:
558           jjb-cache: "{jjb-cache}"
559           jjb-version: "{jjb-version}"
560
561     triggers:
562       - timed: "{obj:cron}"
563
564     builders:
565       - lf-infra-jjbini
566       - shell: !include-raw-escape:
567           - ../shell/jenkins-sandbox-cleanup.sh
568
569 - job-template:
570     name: "{project-name}-jenkins-sandbox-cleanup"
571     id: gerrit-jenkins-sandbox-cleanup
572     <<: *lf_jjb_common
573     # yamllint disable-line rule:key-duplicates
574     <<: *lf_jenkins_sandbox_cleanup
575
576 - job-template:
577     name: "{project-name}-jenkins-sandbox-cleanup"
578     id: github-jenkins-sandbox-cleanup
579     <<: *lf_jjb_common
580     # yamllint disable-line rule:key-duplicates
581     <<: *lf_jenkins_sandbox_cleanup
582
583 ##################
584 # JJB DEPLOY JOB #
585 ##################
586
587 - lf_jjb_deploy_job: &lf_jjb_deploy_job
588     name: lf-jjb-deploy-job
589
590     ######################
591     # Default parameters #
592     ######################
593
594     branch: master
595     disable-job: false
596     # jjb-deploy should always clone $PROJECT regardless of what
597     # $GERRIT_PROJECT triggered the job.
598     git-url: "$GIT_URL/$PROJECT"
599     github-url: "https://github.com"
600     stream: master
601     submodule-timeout: 10
602     submodule-disable: false
603     gerrit_jjb_deploy_job_triggers:
604       - comment-added-contains-event:
605           comment-contains-value: '^Patch Set\s+\d+:\s+(jjb-deploy[:]* (?!\*+$).+$)'
606
607     #####################
608     # Job Configuration #
609     #####################
610
611     project-type: freestyle
612     node: "{build-node}"
613     concurrent: true
614     disabled: "{disable-job}"
615
616     properties:
617       - lf-infra-properties:
618           project: "{project}"
619           build-days-to-keep: 1
620
621     parameters:
622       - lf-infra-parameters:
623           project: "{project}"
624           stream: "{stream}"
625           branch: "{branch}"
626
627     wrappers:
628       - lf-infra-wrappers:
629           build-timeout: 5
630           jenkins-ssh-credential: "{jenkins-ssh-credential}"
631
632     builders:
633       - lf-infra-jjbini
634       - shell: !include-raw-escape: ../shell/jjb-deploy-job.sh
635
636     publishers:
637       - lf-infra-publish
638
639 - job-template:
640     name: "{project-name}-jjb-deploy-job"
641     id: gerrit-jjb-deploy-job
642     <<: *lf_jjb_deploy_job
643
644     scm:
645       - lf-infra-gerrit-scm:
646           git-url: "{git-url}"
647           refspec: "refs/heads/{branch}"
648           branch: "{branch}"
649           submodule-recursive: true
650           submodule-timeout: "{submodule-timeout}"
651           submodule-disable: "{submodule-disable}"
652           choosing-strategy: default
653           jenkins-ssh-credential: "{jenkins-ssh-credential}"
654
655     triggers:
656       - gerrit:
657           server-name: "{gerrit-server-name}"
658           trigger-on: "{obj:gerrit_jjb_deploy_job_triggers}"
659           projects:
660             - project-compare-type: ANT
661               project-pattern: "**"
662               branches:
663                 - branch-compare-type: ANT
664                   branch-pattern: "**"
665           skip-vote:
666             success: true
667             failed: true
668             unstable: true
669             notbuilt: true
670
671 - job-template:
672     name: "{project-name}-jjb-deploy-job"
673     id: github-jjb-deploy-job
674     <<: *lf_jjb_deploy_job
675
676     properties:
677       - lf-infra-properties:
678           project: "{project}"
679           build-days-to-keep: 1
680       - github:
681           url: "{github-url}/{github-org}/{project}"
682
683     scm:
684       - lf-infra-github-scm:
685           url: "{git-clone-url}{github-org}/{project}"
686           refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
687           branch: "$sha1"
688           submodule-recursive: true
689           submodule-timeout: "{submodule-timeout}"
690           submodule-disable: "{submodule-disable}"
691           choosing-strategy: default
692           jenkins-ssh-credential: "{jenkins-ssh-credential}"
693
694     triggers:
695       - github-pull-request:
696           trigger-phrase: '^jjb-deploy (?!\*+$).+$'
697           only-trigger-phrase: true
698           status-context: "JJB Deploy Job"
699           permit-all: true
700           github-hooks: true
701           white-list-target-branches:
702             - "{branch}"
703
704 #############
705 # JJB Merge #
706 #############
707
708 - lf_jjb_merge: &lf_jjb_merge
709     name: lf-jjb-merge
710
711     ######################
712     # Default parameters #
713     ######################
714
715     jjb-workers: 0
716
717     gerrit_merge_triggers:
718       - change-merged-event
719       - comment-added-contains-event:
720           comment-contains-value: '^Patch Set\s+\d+:\s+remerge\s*$'
721
722     #####################
723     # Job Configuration #
724     #####################
725
726     builders:
727       - lf-infra-pre-build
728       - lf-infra-jjbini
729       - inject:
730           properties-content: JJB_WORKERS={jjb-workers}
731       - shell: !include-raw-escape:
732           - ../shell/jjb-merge-job.sh
733
734 - job-template:
735     name: "{project-name}-jjb-merge"
736     id: gerrit-jjb-merge
737     <<: *lf_jjb_common
738     # yamllint disable-line rule:key-duplicates
739     <<: *lf_jjb_merge
740
741     git-url: "$GIT_URL/$GERRIT_PROJECT"
742
743     scm:
744       - lf-infra-gerrit-scm:
745           git-url: "{git-url}"
746           refspec: ""
747           branch: "{branch}"
748           submodule-recursive: "{submodule-recursive}"
749           submodule-timeout: "{submodule-timeout}"
750           submodule-disable: "{submodule-disable}"
751           choosing-strategy: default
752           jenkins-ssh-credential: "{jenkins-ssh-credential}"
753
754     triggers:
755       - gerrit:
756           server-name: "{gerrit-server-name}"
757           trigger-on: "{obj:gerrit_merge_triggers}"
758           projects:
759             - project-compare-type: ANT
760               project-pattern: "{project}"
761               branches:
762                 - branch-compare-type: ANT
763                   branch-pattern: "**/{branch}"
764               file-paths: "{obj:gerrit_trigger_file_paths}"
765
766 - job-template:
767     name: "{project-name}-jjb-merge"
768     id: github-jjb-merge
769     <<: *lf_jjb_common
770     # yamllint disable-line rule:key-duplicates
771     <<: *lf_jjb_merge
772
773     #####################
774     # Job Configuration #
775     #####################
776
777     properties:
778       - lf-infra-properties:
779           project: "{project}"
780           build-days-to-keep: 7
781       - github:
782           url: "{github-url}/{github-org}/{project}"
783
784     scm:
785       - lf-infra-github-scm:
786           url: "{git-clone-url}{github-org}/{project}"
787           refspec: ""
788           branch: "refs/heads/{branch}"
789           submodule-recursive: "{submodule-recursive}"
790           submodule-timeout: "{submodule-timeout}"
791           submodule-disable: "{submodule-disable}"
792           choosing-strategy: default
793           jenkins-ssh-credential: "{jenkins-ssh-credential}"
794
795     triggers:
796       - github
797       - pollscm:
798           cron: ""
799       - github-pull-request:
800           trigger-phrase: "^remerge$"
801           only-trigger-phrase: true
802           status-context: "JJB Merge"
803           permit-all: true
804           github-hooks: true
805           org-list:
806             - "{github-org}"
807           white-list: "{obj:github_pr_whitelist}"
808           admin-list: "{obj:github_pr_admin_list}"
809           included-regions: "{obj:github_included_regions}"
810           white-list-target-branches:
811             - "{branch}"
812
813 ##############
814 # JJB Verify #
815 ##############
816
817 - lf_jjb_verify: &lf_jjb_verify
818     name: lf-jjb-verify
819
820     ######################
821     # Default parameters #
822     ######################
823
824     build-concurrent: true
825     build-node-label-check: false
826     build-node-label-list: ""
827
828     gerrit_verify_triggers:
829       - patchset-created-event:
830           exclude-drafts: true
831           exclude-trivial-rebase: false
832           exclude-no-code-change: false
833       - draft-published-event
834       - comment-added-contains-event:
835           comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
836
837     #####################
838     # Job Configuration #
839     #####################
840
841     concurrent: "{build-concurrent}"
842
843     builders:
844       - lf-infra-pre-build
845       - lf-infra-jjbini
846       - shell: !include-raw-escape:
847           - ../shell/jjb-verify-job.sh
848       - conditional-step:
849           condition-kind: boolean-expression
850           condition-expression: "{build-node-label-check}"
851           on-evaluation-failure: dont-run
852           steps:
853             - inject:
854                 properties-content: EXTERNAL_LABELS="{build-node-label-list}"
855             - shell: !include-raw-escape:
856                 - ../shell/jjb-verify-build-nodes.sh
857       - lf-infra-gpg-verify-git-signature
858
859 - job-template:
860     name: "{project-name}-jjb-verify"
861     id: gerrit-jjb-verify
862     <<: *lf_jjb_common
863     # yamllint disable-line rule:key-duplicates
864     <<: *lf_jjb_verify
865
866     ######################
867     # Default parameters #
868     ######################
869
870     git-url: "$GIT_URL/$GERRIT_PROJECT"
871
872     #####################
873     # Job Configuration #
874     #####################
875
876     scm:
877       - lf-infra-gerrit-scm:
878           git-url: "{git-url}"
879           refspec: "$GERRIT_REFSPEC"
880           branch: "$GERRIT_BRANCH"
881           submodule-recursive: "{submodule-recursive}"
882           submodule-timeout: "{submodule-timeout}"
883           submodule-disable: "{submodule-disable}"
884           choosing-strategy: gerrit
885           jenkins-ssh-credential: "{jenkins-ssh-credential}"
886
887     triggers:
888       - gerrit:
889           server-name: "{gerrit-server-name}"
890           trigger-on: "{obj:gerrit_verify_triggers}"
891           projects:
892             - project-compare-type: ANT
893               project-pattern: "{project}"
894               branches:
895                 - branch-compare-type: ANT
896                   branch-pattern: "**/{branch}"
897               file-paths: "{obj:gerrit_trigger_file_paths}"
898
899 - job-template:
900     name: "{project-name}-jjb-verify"
901     id: github-jjb-verify
902     <<: *lf_jjb_common
903     # yamllint disable-line rule:key-duplicates
904     <<: *lf_jjb_verify
905
906     #####################
907     # Job Configuration #
908     #####################
909
910     properties:
911       - lf-infra-properties:
912           project: "{project}"
913           build-days-to-keep: 7
914       - github:
915           url: "{github-url}/{github-org}/{project}"
916
917     scm:
918       - lf-infra-github-scm:
919           url: "{git-clone-url}{github-org}/{project}"
920           refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
921           branch: "$sha1"
922           submodule-recursive: "{submodule-recursive}"
923           submodule-timeout: "{submodule-timeout}"
924           submodule-disable: "{submodule-disable}"
925           choosing-strategy: default
926           jenkins-ssh-credential: "{jenkins-ssh-credential}"
927
928     triggers:
929       - github-pull-request:
930           trigger-phrase: "^(recheck|reverify)$"
931           only-trigger-phrase: false
932           status-context: "JJB Verify"
933           permit-all: true
934           github-hooks: true
935           included-regions: "{obj:github_included_regions}"
936           white-list-target-branches:
937             - "{branch}"
938
939 ############################
940 # JJB Verify Upstream GJJB #
941 ############################
942
943 - lf_jjb_verify: &lf_jjb_verify_upstream_gjjb
944     name: lf-jjb-verify-upstream-gjjb
945
946     #####################
947     # Job Configuration #
948     #####################
949
950     concurrent: true
951
952     builders:
953       - shell: |
954           cd global-jjb
955           git fetch https://gerrit.linuxfoundation.org/infra/releng/global-jjb $GERRIT_REFSPEC
956           git cherry-pick FETCH_HEAD
957       - lf-infra-jjbini
958       - shell: !include-raw-escape:
959           - ../shell/jjb-verify-job.sh
960       - lf-infra-gpg-verify-git-signature
961
962 - job-template:
963     name: "{project-name}-jjb-verify-upstream-gjjb"
964     id: gerrit-jjb-verify-upstream-gjjb
965     <<: *lf_jjb_common
966     # yamllint disable-line rule:key-duplicates
967     <<: *lf_jjb_verify_upstream_gjjb
968
969     ######################
970     # Default parameters #
971     ######################
972
973     git-url: "$GIT_URL/$PROJECT"
974     submodule-timeout: 10
975     submodule-disable: false
976
977     #####################
978     # Job Configuration #
979     #####################
980
981     scm:
982       - lf-infra-gerrit-scm:
983           git-url: "{git-url}"
984           refspec: ""
985           branch: "master"
986           submodule-recursive: true
987           submodule-timeout: "{submodule-timeout}"
988           submodule-disable: "{submodule-disable}"
989           choosing-strategy: default
990           jenkins-ssh-credential: "{jenkins-ssh-credential}"
991
992     triggers:
993       - gerrit:
994           server-name: "LinuxFoundation"
995           trigger-on:
996             - patchset-created-event:
997                 exclude-drafts: true
998                 exclude-trivial-rebase: false
999                 exclude-no-code-change: false
1000             - draft-published-event
1001             - comment-added-contains-event:
1002                 comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
1003           projects:
1004             - project-compare-type: ANT
1005               project-pattern: "releng/global-jjb"
1006               branches:
1007                 - branch-compare-type: ANT
1008                   branch-pattern: "**/master"
1009           override-votes: true
1010           gerrit-build-failed-codereview-value: -1
1011           gerrit-build-failed-verified-value: 0
1012           gerrit-build-successful-codereview-value: 1
1013           gerrit-build-successful-verified-value: 0
1014
1015 #################
1016 # License Check #
1017 #################
1018
1019 - lf_license_check: &lf_license_check
1020     name: lf-license-check
1021
1022     ######################
1023     # Default parameters #
1024     ######################
1025
1026     branch: master
1027     build-days-to-keep: 7
1028     build-timeout: 15
1029     disable-job: false
1030     file-patterns: >
1031       *.go
1032       *.groovy
1033       *.java
1034       *.py
1035       *.sh
1036     git-url: "$GIT_URL/$PROJECT"
1037     github-url: "https://github.com"
1038     lhc-version: 0.2.0
1039     license-exclude-paths: ""
1040     licenses-allowed: Apache-2.0,EPL-1.0,MIT
1041     project-pattern: "**"
1042     spdx-disable: false
1043     stream: master
1044     submodule-timeout: 10
1045     submodule-disable: false
1046
1047     #####################
1048     # Job Configuration #
1049     #####################
1050
1051     project-type: freestyle
1052     node: "{build-node}"
1053     concurrent: true
1054     disabled: "{disable-job}"
1055
1056     properties:
1057       - lf-infra-properties:
1058           build-days-to-keep: "{build-days-to-keep}"
1059
1060     parameters:
1061       - lf-infra-parameters:
1062           project: "{project}"
1063           branch: "{branch}"
1064           stream: "{stream}"
1065
1066     wrappers:
1067       - lf-infra-wrappers:
1068           build-timeout: "{build-timeout}"
1069           jenkins-ssh-credential: "{jenkins-ssh-credential}"
1070
1071     builders:
1072       - lf-license-check:
1073           file-patterns: "{file-patterns}"
1074           spdx-disable: "{spdx-disable}"
1075           lhc-version: "{lhc-version}"
1076           license-exclude-paths: "{license-exclude-paths}"
1077           licenses-allowed: "{licenses-allowed}"
1078
1079     publishers:
1080       - lf-infra-publish
1081
1082 - job-template:
1083     name: "{project-name}-license-check"
1084     id: gerrit-license-check
1085     <<: *lf_license_check
1086
1087     git-url: "$GIT_URL/$GERRIT_PROJECT"
1088
1089     scm:
1090       - lf-infra-gerrit-scm:
1091           git-url: "{git-url}"
1092           refspec: "$GERRIT_REFSPEC"
1093           branch: "$GERRIT_BRANCH"
1094           # Submodules are out of the project's control
1095           submodule-recursive: false
1096           submodule-timeout: "{submodule-timeout}"
1097           submodule-disable: "{submodule-disable}"
1098           choosing-strategy: gerrit
1099           jenkins-ssh-credential: "{jenkins-ssh-credential}"
1100
1101     triggers:
1102       - gerrit:
1103           server-name: "{gerrit-server-name}"
1104           # Trigger should not be overridable as we want to always run
1105           trigger-on:
1106             - patchset-created-event:
1107                 exclude-drafts: false
1108                 exclude-trivial-rebase: false
1109                 exclude-no-code-change: false
1110             - draft-published-event
1111             - comment-added-contains-event:
1112                 comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
1113           projects:
1114             - project-compare-type: ANT
1115               project-pattern: "{project-pattern}"
1116               branches:
1117                 - branch-compare-type: ANT
1118                   branch-pattern: "**"
1119
1120 - job-template:
1121     name: "{project-name}-license-check"
1122     id: github-license-check
1123     <<: *lf_license_check
1124
1125     properties:
1126       - lf-infra-properties:
1127           build-days-to-keep: "{build-days-to-keep}"
1128       - github:
1129           url: "{github-url}/{github-org}/{project}"
1130
1131     scm:
1132       - lf-infra-github-scm:
1133           url: "{git-clone-url}{github-org}/{project}"
1134           refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
1135           branch: "$sha1"
1136           # Submodules are out of the project's control
1137           submodule-recursive: false
1138           submodule-timeout: "{submodule-timeout}"
1139           submodule-disable: "{submodule-disable}"
1140           choosing-strategy: default
1141           jenkins-ssh-credential: "{jenkins-ssh-credential}"
1142
1143     triggers:
1144       - github-pull-request:
1145           trigger-phrase: "^recheck$"
1146           only-trigger-phrase: false
1147           status-context: "License Check"
1148           permit-all: true
1149           github-hooks: true
1150           white-list-target-branches:
1151             - "{branch}"
1152
1153 ####################
1154 # Info YAML Verify #
1155 ####################
1156
1157 - lf_info_yaml_verify: &lf_info_yaml_verify
1158     name: lf-info-yaml-verify
1159
1160     ######################
1161     # Default parameters #
1162     ######################
1163
1164     gerrit_verify_triggers:
1165       - patchset-created-event:
1166           exclude-drafts: true
1167           exclude-trivial-rebase: false
1168           exclude-no-code-change: false
1169       - draft-published-event
1170       - comment-added-contains-event:
1171           comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
1172
1173     #####################
1174     # Job Configuration #
1175     #####################
1176
1177     concurrent: true
1178
1179     builders:
1180       - shell: !include-raw-escape:
1181           - ../shell/git-validate-info-yaml.sh
1182           - ../shell/info-file-validate.sh
1183
1184 - job-template:
1185     name: "{project-name}-info-yaml-verify"
1186     id: gerrit-info-yaml-verify
1187     <<: *lf_jjb_common
1188     # yamllint disable-line rule:key-duplicates
1189     <<: *lf_info_yaml_verify
1190
1191     git-url: "$GIT_URL/$GERRIT_PROJECT"
1192
1193     scm:
1194       - lf-infra-gerrit-scm:
1195           git-url: "{git-url}"
1196           refspec: "$GERRIT_REFSPEC"
1197           branch: "$GERRIT_BRANCH"
1198           submodule-recursive: "{submodule-recursive}"
1199           submodule-timeout: "{submodule-timeout}"
1200           submodule-disable: "{submodule-disable}"
1201           choosing-strategy: gerrit
1202           jenkins-ssh-credential: "{jenkins-ssh-credential}"
1203
1204     triggers:
1205       - gerrit:
1206           server-name: "{gerrit-server-name}"
1207           trigger-on: "{obj:gerrit_verify_triggers}"
1208           projects:
1209             - project-compare-type: ANT
1210               project-pattern: "{project}"
1211               branches:
1212                 - branch-compare-type: ANT
1213                   branch-pattern: "**/{branch}"
1214               file-paths:
1215                 - compare-type: REG_EXP
1216                   pattern: "INFO.yaml"
1217
1218 - job-template:
1219     name: "{project-name}-info-yaml-verify"
1220     id: github-info-yaml-verify
1221     <<: *lf_jjb_common
1222     # yamllint disable-line rule:key-duplicates
1223     <<: *lf_info_yaml_verify
1224
1225     github-url: "https://github.com"
1226     properties:
1227       - github:
1228           url: "{github-url}/{github-org}/{project}"
1229
1230     scm:
1231       - lf-infra-github-scm:
1232           url: "{git-clone-url}{github-org}/{project}"
1233           refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
1234           branch: "$sha1"
1235           submodule-recursive: "{submodule-recursive}"
1236           submodule-timeout: "{submodule-timeout}"
1237           submodule-disable: "{submodule-disable}"
1238           choosing-strategy: default
1239           jenkins-ssh-credential: "{jenkins-ssh-credential}"
1240
1241     triggers:
1242       - github-pull-request:
1243           trigger-phrase: "^(recheck|reverify)$"
1244           only-trigger-phrase: false
1245           status-context: "INFO File Verify"
1246           permit-all: true
1247           github-hooks: true
1248           # included-regions MUST match gerrit file-paths
1249           included-regions: "INFO.yaml"
1250           white-list-target-branches:
1251             - "{branch}"
1252
1253 ##################
1254 # OPENSTACK CRON #
1255 ##################
1256
1257 - lf_openstack_cron: &lf_openstack_cron
1258     name: lf-openstack-cron
1259
1260     ######################
1261     # Default parameters #
1262     ######################
1263
1264     branch: master
1265     build-days-to-keep: 7
1266     build-timeout: 10
1267     cron: "@hourly"
1268     disable-job: false
1269     git-url: "$GIT_URL/$PROJECT"
1270     github-url: "https://github.com"
1271     openstack-cloud: vex
1272     openstack-image-cleanup: true
1273     openstack-image-cleanup-age: 30
1274     openstack-image-protect: true
1275     openstack-port-cleanup: true
1276     openstack-server-cleanup: true
1277     openstack-stack-cleanup: true
1278     openstack-volume-cleanup: true
1279     stream: master
1280     submodule-timeout: 10
1281     submodule-disable: false
1282
1283     #####################
1284     # Job Configuration #
1285     #####################
1286
1287     project-type: freestyle
1288     node: "{build-node}"
1289     concurrent: false
1290     disabled: "{disable-job}"
1291
1292     properties:
1293       - lf-infra-properties:
1294           build-days-to-keep: "{build-days-to-keep}"
1295
1296     parameters:
1297       - lf-infra-parameters:
1298           project: "{project}"
1299           stream: "{stream}"
1300           branch: "{branch}"
1301       - string:
1302           name: JENKINS_URLS
1303           default: "{jenkins-urls}"
1304           description: |
1305             Space separated list of Jenkins URLs to check for active builds.
1306
1307     wrappers:
1308       - lf-infra-wrappers:
1309           build-timeout: "{build-timeout}"
1310           jenkins-ssh-credential: "{jenkins-ssh-credential}"
1311       # Listed after to override openstack-infra-wrappers clouds.yaml definition
1312       - config-file-provider:
1313           files:
1314             - file-id: clouds-yaml
1315               target: "$HOME/.config/openstack/clouds.yaml"
1316             - file-id: npmrc
1317               target: "$HOME/.npmrc"
1318             - file-id: pipconf
1319               target: "$HOME/.config/pip/pip.conf"
1320
1321     triggers:
1322       - timed: "{obj:cron}"
1323
1324     builders:
1325       - lf-infra-pre-build
1326       - inject:
1327           properties-content: OS_CLOUD={openstack-cloud}
1328       # Stacks
1329       - conditional-step:
1330           condition-kind: boolean-expression
1331           condition-expression: "{openstack-stack-cleanup}"
1332           steps:
1333             - shell: !include-raw-escape: ../shell/openstack-cleanup-orphaned-stacks.sh
1334       # Servers
1335       - conditional-step:
1336           condition-kind: boolean-expression
1337           condition-expression: "{openstack-server-cleanup}"
1338           steps:
1339             - shell: !include-raw-escape: ../shell/openstack-cleanup-orphaned-servers.sh
1340       # Ports
1341       - conditional-step:
1342           condition-kind: boolean-expression
1343           condition-expression: "{openstack-port-cleanup}"
1344           steps:
1345             - shell: !include-raw-escape: ../shell/openstack-cleanup-orphaned-ports.sh
1346       # Volumes
1347       - conditional-step:
1348           condition-kind: boolean-expression
1349           condition-expression: "{openstack-volume-cleanup}"
1350           steps:
1351             - shell: !include-raw-escape: ../shell/openstack-cleanup-orphaned-volumes.sh
1352       # Images
1353       - conditional-step:
1354           condition-kind: boolean-expression
1355           condition-expression: "{openstack-image-protect}"
1356           steps:
1357             - shell: !include-raw-escape: ../shell/openstack-protect-in-use-images.sh
1358       - conditional-step:
1359           condition-kind: boolean-expression
1360           condition-expression: "{openstack-image-cleanup}"
1361           steps:
1362             - inject:
1363                 properties-content: OS_IMAGE_CLEANUP_AGE={openstack-image-cleanup-age}
1364             - shell: !include-raw-escape: ../shell/openstack-cleanup-old-images.sh
1365
1366     publishers:
1367       - lf-infra-publish
1368
1369 - job-template:
1370     name: "{project-name}-openstack-cron"
1371     id: gerrit-openstack-cron
1372     <<: *lf_openstack_cron
1373
1374     scm:
1375       - lf-infra-gerrit-scm:
1376           git-url: "{git-url}"
1377           refspec: "refs/heads/{branch}"
1378           branch: "{branch}"
1379           submodule-recursive: true
1380           submodule-timeout: "{submodule-timeout}"
1381           submodule-disable: "{submodule-disable}"
1382           choosing-strategy: default
1383           jenkins-ssh-credential: "{jenkins-ssh-credential}"
1384
1385 - job-template:
1386     name: "{project-name}-openstack-cron"
1387     id: github-openstack-cron
1388     <<: *lf_openstack_cron
1389
1390     scm:
1391       - lf-infra-github-scm:
1392           url: "{git-clone-url}{github-org}/{project}"
1393           refspec: ""
1394           branch: "refs/heads/{branch}"
1395           submodule-recursive: true
1396           submodule-timeout: "{submodule-timeout}"
1397           submodule-disable: "{submodule-disable}"
1398           choosing-strategy: default
1399           jenkins-ssh-credential: "{jenkins-ssh-credential}"
1400
1401 ################
1402 # Packer Merge #
1403 ################
1404
1405 - lf_packer_merge: &lf_packer_merge
1406     name: lf-packer-merge
1407
1408     ######################
1409     # Default parameters #
1410     ######################
1411
1412     openstack: true
1413     openstack-cloud: vex
1414     update-cloud-image: false
1415
1416     #####################
1417     # Job Configuration #
1418     #####################
1419
1420     parameters:
1421       - lf-infra-parameters:
1422           project: "{project}"
1423           stream: "{stream}"
1424           branch: "{branch}"
1425       - lf-packer-parameters:
1426           packer-version: "{packer-version}"
1427       - bool:
1428           name: UPDATE_CLOUD_IMAGE
1429           default: "{update-cloud-image}"
1430           description: "Update new built image on the cloud."
1431
1432     builders:
1433       - lf-infra-packer-build:
1434           openstack: "{openstack}"
1435           openstack-cloud: "{openstack-cloud}"
1436           packer-cloud-settings: "{packer-cloud-settings}"
1437           packer-version: "{packer-version}"
1438           platform: "{platforms}"
1439           template: "{templates}"
1440           update-cloud-image: "{update-cloud-image}"
1441       - description-setter:
1442           regexp: '(\s+.*)(ZZCI\s+.*\d+-\d+\.\d+)'
1443           description: 'Image: \2'
1444       # - trigger-builds:
1445       #     - project: '{project-name}-openstack-update-cloud-image'
1446       #       block: false
1447       #       predefined-parameters: |
1448       #         GERRIT_BRANCH=$GERRIT_BRANCH
1449       #         GERRIT_PROJECT=$GERRIT_PROJECT
1450       #         GERRIT_REFSPEC=$GERRIT_REFSPEC
1451       #         NEW_IMAGE_NAME=$NEW_IMAGE_NAME
1452       #       property-file: variables.jenkins-trigger
1453       #       property-file-fail-on-missing: true
1454
1455     publishers:
1456       - lf-infra-publish
1457       - trigger-parameterized-builds:
1458           - project: "{project-name}-openstack-update-cloud-image"
1459             condition: UNSTABLE_OR_BETTER
1460             predefined-parameters: |
1461               NEW_IMAGE_NAME=$NEW_IMAGE_NAME
1462             property-file: variables.jenkins-trigger
1463             fail-on-missing: true
1464
1465 - job-template:
1466     name: "{project-name}-packer-merge-{platforms}-{templates}"
1467     id: gerrit-packer-merge
1468     <<: *lf_packer_common
1469     # yamllint disable-line rule:key-duplicates
1470     <<: *lf_packer_merge
1471
1472     ######################
1473     # Default parameters #
1474     ######################
1475
1476     git-url: "$GIT_URL/$GERRIT_PROJECT"
1477
1478     gerrit_merge_triggers:
1479       - change-merged-event
1480       - comment-added-contains-event:
1481           comment-contains-value: '^Patch Set\s+\d+:\s+remerge\s*$'
1482
1483     #####################
1484     # Job Configuration #
1485     #####################
1486
1487     scm:
1488       - lf-infra-gerrit-scm:
1489           git-url: "{git-url}"
1490           refspec: "$GERRIT_REFSPEC"
1491           branch: "$GERRIT_BRANCH"
1492           submodule-recursive: "{submodule-recursive}"
1493           submodule-timeout: "{submodule-timeout}"
1494           submodule-disable: "{submodule-disable}"
1495           choosing-strategy: default
1496           jenkins-ssh-credential: "{jenkins-ssh-credential}"
1497
1498     triggers:
1499       - timed: "{obj:cron}"
1500       - gerrit:
1501           server-name: "{gerrit-server-name}"
1502           trigger-on: "{obj:gerrit_merge_triggers}"
1503           projects:
1504             - project-compare-type: ANT
1505               project-pattern: "{project}"
1506               branches:
1507                 - branch-compare-type: ANT
1508                   branch-pattern: "**/{branch}"
1509               file-paths:
1510                 - compare-type: REG_EXP
1511                   pattern: 'packer\/provision\/.*\.sh'
1512                 - compare-type: REG_EXP
1513                   pattern: 'packer\/provision\/.*\.bat'
1514                 - compare-type: REG_EXP
1515                   pattern: 'packer\/provision\/.*\.ps1'
1516                 - compare-type: REG_EXP
1517                   pattern: 'packer\/provision\/{templates}\.yaml'
1518                 - compare-type: REG_EXP
1519                   pattern: 'packer\/provision\/local-{templates}\.yaml'
1520                 - compare-type: REG_EXP
1521                   pattern: 'packer\/templates\/{templates}\.json'
1522                 - compare-type: REG_EXP
1523                   pattern: 'packer\/vars\/{platforms}\.json'
1524
1525 - job-template:
1526     name: "{project-name}-packer-merge-{platforms}-{templates}"
1527     id: github-packer-merge
1528     <<: *lf_packer_common
1529     # yamllint disable-line rule:key-duplicates
1530     <<: *lf_packer_merge
1531
1532     #####################
1533     # Job Configuration #
1534     #####################
1535
1536     properties:
1537       - lf-infra-properties:
1538           project: "{project}"
1539           build-days-to-keep: 7
1540       - github:
1541           url: "{github-url}/{github-org}/{project}"
1542
1543     scm:
1544       - lf-infra-github-scm:
1545           url: "{git-clone-url}{github-org}/{project}"
1546           refspec: >
1547             +refs/heads/*:refs/remotes/origin/*
1548             +refs/pull/*:refs/remotes/origin/pr/*
1549           branch: "$GERRIT_REFSPEC"
1550           submodule-recursive: "{submodule-recursive}"
1551           submodule-timeout: "{submodule-timeout}"
1552           submodule-disable: "{submodule-disable}"
1553           choosing-strategy: default
1554           jenkins-ssh-credential: "{jenkins-ssh-credential}"
1555
1556     triggers:
1557       - timed: "{obj:cron}"
1558       - github
1559       - pollscm:
1560           cron: ""
1561
1562       - github-pull-request:
1563           trigger-phrase: "^remerge$"
1564           only-trigger-phrase: true
1565           status-context: "Packer {platforms}-{templates} Merge"
1566           permit-all: true
1567           github-hooks: true
1568           org-list:
1569             - "{github-org}"
1570           white-list: "{obj:github_pr_whitelist}"
1571           admin-list: "{obj:github_pr_admin_list}"
1572           # included-regions MUST match Gerrit Trigger file-paths
1573           included-regions:
1574             - 'packer\/provision\/.*\.sh'
1575             - 'packer\/provision\/.*\.bat'
1576             - 'packer\/provision\/.*\.ps1'
1577             - 'packer\/provision\/{templates}\.yaml'
1578             - 'packer\/provision\/local-{templates}\.yaml'
1579             - 'packer\/templates\/{templates}\.json'
1580             - 'packer\/vars\/{platforms}\.json'
1581           white-list-target-branches:
1582             - "{branch}"
1583
1584 - job-template:
1585     name: "{project-name}-packer-verify-build-{platforms}-{templates}"
1586     id: gerrit-packer-verify-build
1587     <<: *lf_packer_common
1588     # yamllint disable-line rule:key-duplicates
1589     <<: *lf_packer_merge
1590
1591     ######################
1592     # Default parameters #
1593     ######################
1594
1595     git-url: "$GIT_URL/$GERRIT_PROJECT"
1596
1597     gerrit_verify_triggers:
1598       - comment-added-contains-event:
1599           comment-contains-value: '^Patch Set\s+\d+:\s+(verify-build|packer-build)\s*$'
1600
1601     #####################
1602     # Job Configuration #
1603     #####################
1604
1605     scm:
1606       - lf-infra-gerrit-scm:
1607           git-url: "{git-url}"
1608           refspec: "$GERRIT_REFSPEC"
1609           branch: "$GERRIT_BRANCH"
1610           submodule-recursive: "{submodule-recursive}"
1611           submodule-timeout: "{submodule-timeout}"
1612           submodule-disable: "{submodule-disable}"
1613           choosing-strategy: gerrit
1614           jenkins-ssh-credential: "{jenkins-ssh-credential}"
1615
1616     triggers:
1617       - gerrit:
1618           server-name: "{gerrit-server-name}"
1619           trigger-on: "{obj:gerrit_verify_triggers}"
1620           projects:
1621             - project-compare-type: ANT
1622               project-pattern: "{project}"
1623               branches:
1624                 - branch-compare-type: ANT
1625                   branch-pattern: "**/{branch}"
1626               file-paths:
1627                 - compare-type: REG_EXP
1628                   pattern: 'packer\/provision\/.*\.sh'
1629                 - compare-type: REG_EXP
1630                   pattern: 'packer\/provision\/.*\.bat'
1631                 - compare-type: REG_EXP
1632                   pattern: 'packer\/provision\/.*\.ps1'
1633                 - compare-type: REG_EXP
1634                   pattern: 'packer\/provision\/{templates}\.yaml'
1635                 - compare-type: REG_EXP
1636                   pattern: 'packer\/provision\/local-{templates}\.yaml'
1637                 - compare-type: REG_EXP
1638                   pattern: 'packer\/templates\/{templates}\.json'
1639                 - compare-type: REG_EXP
1640                   pattern: 'packer\/vars\/{platforms}\.json'
1641
1642 - job-template:
1643     name: "{project-name}-packer-verify-build-{platforms}-{templates}"
1644     id: github-packer-verify-build
1645     <<: *lf_packer_common
1646     # yamllint disable-line rule:key-duplicates
1647     <<: *lf_packer_merge
1648
1649     #####################
1650     # Job Configuration #
1651     #####################
1652
1653     properties:
1654       - lf-infra-properties:
1655           project: "{project}"
1656           build-days-to-keep: 7
1657       - github:
1658           url: "{github-url}/{github-org}/{project}"
1659
1660     scm:
1661       - lf-infra-github-scm:
1662           url: "{git-clone-url}{github-org}/{project}"
1663           refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
1664           branch: "$sha1"
1665           submodule-recursive: "{submodule-recursive}"
1666           submodule-timeout: "{submodule-timeout}"
1667           submodule-disable: "{submodule-disable}"
1668           choosing-strategy: default
1669           jenkins-ssh-credential: "{jenkins-ssh-credential}"
1670
1671     triggers:
1672       - github-pull-request:
1673           trigger-phrase: "^(verify-build|packer-build)$"
1674           only-trigger-phrase: true
1675           status-context: "Packer {platforms}-{templates} Verify Build"
1676           permit-all: true
1677           github-hooks: true
1678           white-list-target-branches:
1679             - "{branch}"
1680           # included-regions MUST match Gerrit Trigger file-paths
1681           included-regions:
1682             - 'packer\/provision\/.*\.sh'
1683             - 'packer\/provision\/.*\.bat'
1684             - 'packer\/provision\/.*\.ps1'
1685             - 'packer\/provision\/{templates}\.yaml'
1686             - 'packer\/provision\/local-{templates}\.yaml'
1687             - 'packer\/templates\/{templates}\.json'
1688             - 'packer\/vars\/{platforms}\.json'
1689
1690 #################
1691 # Packer Verify #
1692 #################
1693
1694 - lf_packer_verify: &lf_packer_verify
1695     name: lf-packer-verify
1696
1697     ######################
1698     # Default parameters #
1699     ######################
1700
1701     build-timeout: 10
1702     openstack: true
1703     openstack-cloud: vex
1704
1705     gerrit_verify_triggers:
1706       - patchset-created-event:
1707           exclude-drafts: true
1708           exclude-trivial-rebase: false
1709           exclude-no-code-change: false
1710       - draft-published-event
1711       - comment-added-contains-event:
1712           comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
1713
1714     gerrit_trigger_file_paths:
1715       - compare-type: REG_EXP
1716         pattern: 'packer\/.*'
1717
1718     # github_included_regions MUST match gerrit_trigger_file_paths
1719     github_included_regions:
1720       - 'packer\/.*'
1721
1722     #####################
1723     # Job Configuration #
1724     #####################
1725
1726     concurrent: true
1727
1728     builders:
1729       - lf-infra-packer-validate:
1730           openstack: "{openstack}"
1731           openstack-cloud: "{openstack-cloud}"
1732           packer-cloud-settings: "{packer-cloud-settings}"
1733           packer-version: "{packer-version}"
1734
1735 - job-template:
1736     name: "{project-name}-packer-verify"
1737     id: gerrit-packer-verify
1738     <<: *lf_packer_common
1739     # yamllint disable-line rule:key-duplicates
1740     <<: *lf_packer_verify
1741
1742     ######################
1743     # Default parameters #
1744     ######################
1745
1746     git-url: "$GIT_URL/$GERRIT_PROJECT"
1747
1748     #####################
1749     # Job Configuration #
1750     #####################
1751
1752     scm:
1753       - lf-infra-gerrit-scm:
1754           git-url: "{git-url}"
1755           refspec: "$GERRIT_REFSPEC"
1756           branch: "$GERRIT_BRANCH"
1757           submodule-recursive: "{submodule-recursive}"
1758           submodule-timeout: "{submodule-timeout}"
1759           submodule-disable: "{submodule-disable}"
1760           choosing-strategy: gerrit
1761           jenkins-ssh-credential: "{jenkins-ssh-credential}"
1762
1763     triggers:
1764       - gerrit:
1765           server-name: "{gerrit-server-name}"
1766           trigger-on: "{obj:gerrit_verify_triggers}"
1767           projects:
1768             - project-compare-type: ANT
1769               project-pattern: "{project}"
1770               branches:
1771                 - branch-compare-type: ANT
1772                   branch-pattern: "**/{branch}"
1773               file-paths: "{obj:gerrit_trigger_file_paths}"
1774
1775 - job-template:
1776     name: "{project-name}-packer-verify"
1777     id: github-packer-verify
1778     <<: *lf_packer_common
1779     # yamllint disable-line rule:key-duplicates
1780     <<: *lf_packer_verify
1781
1782     #####################
1783     # Job Configuration #
1784     #####################
1785
1786     properties:
1787       - lf-infra-properties:
1788           project: "{project}"
1789           build-days-to-keep: 7
1790       - github:
1791           url: "{github-url}/{github-org}/{project}"
1792
1793     scm:
1794       - lf-infra-github-scm:
1795           url: "{git-clone-url}{github-org}/{project}"
1796           refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
1797           branch: "$sha1"
1798           submodule-recursive: "{submodule-recursive}"
1799           submodule-timeout: "{submodule-timeout}"
1800           submodule-disable: "{submodule-disable}"
1801           choosing-strategy: default
1802           jenkins-ssh-credential: "{jenkins-ssh-credential}"
1803
1804     triggers:
1805       - github-pull-request:
1806           trigger-phrase: "^(recheck|reverify)$"
1807           only-trigger-phrase: false
1808           status-context: "Packer Verify"
1809           permit-all: true
1810           github-hooks: true
1811           included-regions: "{obj:github_included_regions}"
1812           white-list-target-branches:
1813             - "{branch}"
1814
1815 ################################
1816 # Openstack Update Cloud Image #
1817 ################################
1818
1819 - lf_openstack_cron: &lf_openstack_update_cloud_image
1820     name: lf-openstack-update-cloud-image
1821
1822     ######################
1823     # Default parameters #
1824     ######################
1825
1826     branch: master
1827     build-days-to-keep: 7
1828     build-timeout: 10
1829     cron: "@monthly"
1830     disable-job: false
1831     git-url: "$GIT_URL/$PROJECT"
1832     github-url: "https://github.com"
1833     new-image-name: "all"
1834     openstack-cloud: vex
1835     stream: master
1836     submodule-timeout: 10
1837     submodule-disable: false
1838     update-cloud-image: false
1839
1840     #####################
1841     # Job Configuration #
1842     #####################
1843
1844     project-type: freestyle
1845     node: "{build-node}"
1846     concurrent: false
1847     disabled: "{disable-job}"
1848
1849     properties:
1850       - lf-infra-properties:
1851           build-days-to-keep: "{build-days-to-keep}"
1852
1853     parameters:
1854       - lf-infra-parameters:
1855           project: "{project}"
1856           stream: "{stream}"
1857           branch: "{branch}"
1858       - string:
1859           name: NEW_IMAGE_NAME
1860           default: "{new-image-name}"
1861           description: "Name of cloud image to update in Jenkins"
1862
1863     wrappers:
1864       - lf-infra-wrappers:
1865           build-timeout: "{build-timeout}"
1866           jenkins-ssh-credential: "{jenkins-ssh-credential}"
1867       # Listed after to override openstack-infra-wrappers clouds.yaml definition
1868       - config-file-provider:
1869           files:
1870             - file-id: clouds-yaml
1871               target: "$HOME/.config/openstack/clouds.yaml"
1872             - file-id: npmrc
1873               target: "$HOME/.npmrc"
1874             - file-id: pipconf
1875               target: "$HOME/.config/pip/pip.conf"
1876
1877     builders:
1878       - lf-infra-pre-build
1879       - inject:
1880           properties-content: |
1881             OS_CLOUD={openstack-cloud}
1882       - shell: |
1883           #!/bin/bash
1884           echo "Extract the image type for commit message"
1885           # echo IMAGE_TYPE=${{NEW_IMAGE_NAME% -*}} >> image-type.txt
1886           IMAGE_TYPE=$(echo ${{NEW_IMAGE_NAME}} | tr -d "\'\"\ " | awk -F- '{{ print $2 " " $3 " " $4 }}')
1887           echo IMAGE_TYPE=${{IMAGE_TYPE}} >> image-type.txt
1888           cat image-type.txt
1889       - inject:
1890           properties-file: "image-type.txt"
1891       - lf-infra-update-packer-images
1892       - lf-infra-push-gerrit-patch:
1893           project: "{project}"
1894           gerrit-user: "{gerrit-user}"
1895           gerrit-host: "{gerrit-host}"
1896           gerrit-topic: "{gerrit-topic}"
1897           gerrit-commit-message: "Update cloud image $IMAGE_TYPE"
1898           reviewers-email: "{reviewers-email}"
1899
1900     publishers:
1901       - lf-infra-publish
1902
1903 - job-template:
1904     name: "{project-name}-openstack-update-cloud-image"
1905     id: gerrit-openstack-update-cloud-image
1906     <<: *lf_openstack_update_cloud_image
1907
1908     ######################
1909     # Default parameters #
1910     ######################
1911
1912     git-url: "$GIT_URL/$GERRIT_PROJECT"
1913
1914     #####################
1915     # Job Configuration #
1916     #####################
1917
1918     scm:
1919       - lf-infra-gerrit-scm:
1920           git-url: "{git-url}"
1921           refspec: "$GERRIT_REFSPEC"
1922           branch: "$GERRIT_BRANCH"
1923           submodule-recursive: false
1924           submodule-timeout: "{submodule-timeout}"
1925           submodule-disable: "{submodule-disable}"
1926           choosing-strategy: gerrit
1927           jenkins-ssh-credential: "{jenkins-ssh-credential}"
1928
1929     triggers:
1930       - timed: "{obj:cron}"
1931
1932 #################
1933 # Puppet Verify #
1934 #################
1935
1936 - lf_puppet_verify: &lf_puppet_verify
1937     name: lf-puppet-verify
1938
1939     ######################
1940     # Default parameters #
1941     ######################
1942
1943     branch: master
1944     build-days-to-keep: 7
1945     build-timeout: 15
1946     disable-job: false
1947     git-url: "$GIT_URL/$GERRIT_PROJECT"
1948     github-url: "https://github.com"
1949     parallel: true
1950     puppet-dir: ""
1951     puppet-lint-version: 2.3.6
1952     stream: master
1953     submodule-recursive: true
1954     submodule-timeout: 10
1955     submodule-disable: false
1956
1957     gerrit_trigger_file_paths:
1958       - compare-type: REG_EXP
1959         pattern: ".*"
1960
1961     # github_included_regions MUST match gerrit_trigger_file_paths
1962     github_included_regions:
1963       - ".*"
1964
1965     #####################
1966     # Job Configuration #
1967     #####################
1968
1969     project-type: freestyle
1970     node: "{build-node}"
1971     concurrent: true
1972     disabled: "{disable-job}"
1973
1974     properties:
1975       - lf-infra-properties:
1976           build-days-to-keep: "{build-days-to-keep}"
1977
1978     parameters:
1979       - lf-infra-parameters:
1980           project: "{project}"
1981           branch: "{branch}"
1982           stream: "{stream}"
1983       - lf-puppet-parameters:
1984           puppet-lint-version: "{puppet-lint-version}"
1985
1986     wrappers:
1987       - lf-infra-wrappers:
1988           build-timeout: "{build-timeout}"
1989           jenkins-ssh-credential: "{jenkins-ssh-credential}"
1990
1991     builders:
1992       - shell: !include-raw-escape: ../shell/puppet-lint.sh
1993
1994     publishers:
1995       - lf-infra-publish
1996
1997 - job-template:
1998     name: "{project-name}-puppet-verify"
1999     id: gerrit-puppet-verify
2000     <<: *lf_puppet_verify
2001
2002     ######################
2003     # Default parameters #
2004     ######################
2005
2006     gerrit_verify_triggers:
2007       - patchset-created-event:
2008           exclude-drafts: true
2009           exclude-trivial-rebase: false
2010           exclude-no-code-change: false
2011       - draft-published-event
2012       - comment-added-contains-event:
2013           comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
2014
2015     #####################
2016     # Job Configuration #
2017     #####################
2018
2019     scm:
2020       - lf-infra-gerrit-scm:
2021           jenkins-ssh-credential: "{jenkins-ssh-credential}"
2022           git-url: "{git-url}"
2023           refspec: "$GERRIT_REFSPEC"
2024           branch: "$GERRIT_BRANCH"
2025           submodule-recursive: "{submodule-recursive}"
2026           submodule-timeout: "{submodule-timeout}"
2027           submodule-disable: "{submodule-disable}"
2028           choosing-strategy: gerrit
2029
2030     triggers:
2031       - gerrit:
2032           server-name: "{gerrit-server-name}"
2033           trigger-on: "{obj:gerrit_verify_triggers}"
2034           projects:
2035             - project-compare-type: ANT
2036               project-pattern: "{project}"
2037               branches:
2038                 - branch-compare-type: ANT
2039                   branch-pattern: "**/{branch}"
2040               file-paths: "{obj:gerrit_trigger_file_paths}"
2041
2042 - job-template:
2043     name: "{project-name}-puppet-verify"
2044     id: github-puppet-verify
2045     <<: *lf_puppet_verify
2046
2047     #####################
2048     # Job Configuration #
2049     #####################
2050
2051     properties:
2052       - lf-infra-properties:
2053           project: "{project}"
2054           build-days-to-keep: 7
2055       - github:
2056           url: "{github-url}/{github-org}/{project}"
2057
2058     scm:
2059       - lf-infra-github-scm:
2060           url: "{git-clone-url}{github-org}/{project}"
2061           refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
2062           branch: "$sha1"
2063           submodule-recursive: "{submodule-recursive}"
2064           submodule-timeout: "{submodule-timeout}"
2065           submodule-disable: "{submodule-disable}"
2066           choosing-strategy: default
2067           jenkins-ssh-credential: "{jenkins-ssh-credential}"
2068
2069     triggers:
2070       - github-pull-request:
2071           trigger-phrase: "^(recheck|reverify)$"
2072           only-trigger-phrase: false
2073           status-context: "Puppet Verify"
2074           permit-all: true
2075           github-hooks: true
2076           included-regions: "{obj:github_included_regions}"
2077           white-list-target-branches:
2078             - "{branch}"
2079
2080 #########
2081 # Sonar #
2082 #########
2083
2084 - lf_sonar_common: &lf_sonar_common
2085     name: lf-sonar-common
2086
2087     ######################
2088     # Default parameters #
2089     ######################
2090
2091     archive-artifacts: >
2092       **/*.log
2093
2094     branch: master # Sonar should always be run on master branch
2095     build-days-to-keep: 7
2096     build-timeout: 60
2097     cron: "H H * * *" # run daily
2098     disable-job: false
2099     git-url: "$GIT_URL/$PROJECT"
2100     github-url: "https://github.com"
2101     stream: master
2102     submodule-recursive: true
2103     submodule-timeout: 10
2104     submodule-disable: false
2105
2106     # Sonar properties
2107     sonar-task: ""
2108     sonar-project-file: "sonar-project.properties"
2109     sonar-properties: ""
2110     sonar-java-opts: ""
2111     sonar-additional-args: ""
2112
2113     gerrit_trigger_file_paths:
2114       - compare-type: REG_EXP
2115         pattern: ".*"
2116
2117     # github_included_regions MUST match gerrit_trigger_file_paths
2118     github_included_regions:
2119       - ".*"
2120
2121     #####################
2122     # Job Configuration #
2123     #####################
2124
2125     project-type: freestyle
2126     node: "{build-node}"
2127
2128     properties:
2129       - lf-infra-properties:
2130           build-days-to-keep: "{build-days-to-keep}"
2131
2132     wrappers:
2133       - lf-infra-wrappers:
2134           build-timeout: "{build-timeout}"
2135           jenkins-ssh-credential: "{jenkins-ssh-credential}"
2136
2137     disabled: "{disable-job}"
2138
2139     parameters:
2140       - lf-infra-parameters:
2141           project: "{project}"
2142           branch: "{branch}"
2143           stream: "{stream}"
2144       - string:
2145           name: ARCHIVE_ARTIFACTS
2146           default: "{archive-artifacts}"
2147           description: Artifacts to archive to the logs server.
2148
2149     publishers:
2150       - lf-infra-publish
2151
2152 - lf_sonar_builders: &lf_sonar_builders
2153     name: lf-sonar-builders
2154     builders:
2155       - lf-infra-pre-build
2156       - lf-infra-sonar:
2157           sonar-task: "{sonar-task}"
2158           sonar-project-file: "{sonar-project-file}"
2159           sonar-properties: "{sonar-properties}"
2160           sonar-java-opts: "{sonar-java-opts}"
2161           sonar-additional-args: "{sonar-additional-args}"
2162
2163 - lf_sonar_builders_prescan: &lf_sonar_builders_prescan
2164     name: lf-sonar-builders-prescan
2165     builders:
2166       - lf-infra-pre-build
2167       - lf-infra-sonar-with-prescan:
2168           sonar-task: "{sonar-task}"
2169           sonar-project-file: "{sonar-project-file}"
2170           sonar-properties: "{sonar-properties}"
2171           sonar-java-opts: "{sonar-java-opts}"
2172           sonar-additional-args: "{sonar-additional-args}"
2173
2174 - lf_sonar_builders_prescan_script: &lf_sonar_builders_prescan_script
2175     name: lf-sonar-builders-prescan-script
2176     builders:
2177       - lf-infra-pre-build
2178       - shell: "{sonar-prescan-script}"
2179       - lf-infra-sonar:
2180           sonar-task: "{sonar-task}"
2181           sonar-project-file: "{sonar-project-file}"
2182           sonar-properties: "{sonar-properties}"
2183           sonar-java-opts: "{sonar-java-opts}"
2184           sonar-additional-args: "{sonar-additional-args}"
2185
2186 - lf_sonar_gerrit_common: &lf_sonar_gerrit_common
2187     name: lf-sonar-gerrit-common
2188     gerrit_sonar_triggers:
2189       - comment-added-contains-event:
2190           comment-contains-value: '^Patch Set\s+\d+:\s+run-sonar\s*$'
2191
2192     scm:
2193       - lf-infra-gerrit-scm:
2194           jenkins-ssh-credential: "{jenkins-ssh-credential}"
2195           git-url: "{git-url}"
2196           refspec: $GERRIT_REFSPEC
2197           branch: $GERRIT_BRANCH
2198           submodule-recursive: "{submodule-recursive}"
2199           submodule-timeout: "{submodule-timeout}"
2200           submodule-disable: "{submodule-disable}"
2201           choosing-strategy: default
2202
2203     triggers:
2204       - timed: "{obj:cron}"
2205       - gerrit:
2206           server-name: "{gerrit-server-name}"
2207           trigger-on: "{obj:gerrit_sonar_triggers}"
2208           projects:
2209             - project-compare-type: "ANT"
2210               project-pattern: "{project}"
2211               branches:
2212                 - branch-compare-type: "ANT"
2213                   branch-pattern: "**/{branch}"
2214               file-paths: "{obj:gerrit_trigger_file_paths}"
2215           skip-vote:
2216             successful: true
2217             failed: true
2218             unstable: true
2219             notbuilt: true
2220
2221 - lf_sonar_github_common: &lf_sonar_github_common
2222     name: lf-sonar-github-common
2223     properties:
2224       - lf-infra-properties:
2225           build-days-to-keep: "{build-days-to-keep}"
2226       - github:
2227           url: "{github-url}/{github-org}/{project}"
2228
2229     scm:
2230       - lf-infra-github-scm:
2231           url: "{git-clone-url}{github-org}/{project}"
2232           refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
2233           branch: "$sha1"
2234           submodule-recursive: "{submodule-recursive}"
2235           submodule-timeout: "{submodule-timeout}"
2236           submodule-disable: "{submodule-disable}"
2237           choosing-strategy: default
2238           jenkins-ssh-credential: "{jenkins-ssh-credential}"
2239
2240     triggers:
2241       - github-pull-request:
2242           trigger-phrase: "^run-sonar$"
2243           only-trigger-phrase: false
2244           status-context: "Python Sonar"
2245           permit-all: true
2246           github-hooks: true
2247           white-list-target-branches:
2248             - "{branch}"
2249           included-regions: "{obj:github_included_regions}"
2250
2251 - job-template:
2252     name: "{project-name}-sonar"
2253     id: gerrit-sonar
2254     <<: *lf_sonar_common
2255     # yamllint disable-line rule:key-duplicates
2256     <<: *lf_sonar_builders
2257     # yamllint disable-line rule:key-duplicates
2258     <<: *lf_sonar_gerrit_common
2259
2260 - job-template:
2261     name: "{project-name}-sonar"
2262     id: github-sonar
2263     <<: *lf_sonar_common
2264     # yamllint disable-line rule:key-duplicates
2265     <<: *lf_sonar_builders
2266     # yamllint disable-line rule:key-duplicates
2267     <<: *lf_sonar_github_common
2268
2269 - job-template:
2270     name: "{project-name}-sonar-prescan"
2271     id: gerrit-sonar-prescan
2272     <<: *lf_sonar_common
2273     # yamllint disable-line rule:key-duplicates
2274     <<: *lf_sonar_builders_prescan
2275     # yamllint disable-line rule:key-duplicates
2276     <<: *lf_sonar_gerrit_common
2277
2278 - job-template:
2279     name: "{project-name}-sonar-prescan"
2280     id: github-sonar-prescan
2281     <<: *lf_sonar_common
2282     # yamllint disable-line rule:key-duplicates
2283     <<: *lf_sonar_builders_prescan
2284     # yamllint disable-line rule:key-duplicates
2285     <<: *lf_sonar_github_common
2286
2287 - job-template:
2288     name: "{project-name}-sonar-prescan-script"
2289     id: gerrit-sonar-prescan-script
2290     <<: *lf_sonar_common
2291     # yamllint disable-line rule:key-duplicates
2292     <<: *lf_sonar_builders_prescan_script
2293     # yamllint disable-line rule:key-duplicates
2294     <<: *lf_sonar_gerrit_common
2295
2296 - job-template:
2297     name: "{project-name}-sonar-prescan-script"
2298     id: github-sonar-prescan-script
2299     <<: *lf_sonar_common
2300     # yamllint disable-line rule:key-duplicates
2301     <<: *lf_sonar_builders_prescan_script
2302     # yamllint disable-line rule:key-duplicates
2303     <<: *lf_sonar_github_common