620783fc89a35890e0de8f34cb4d4909925d9711
[releng/global-jjb.git] / jjb / lf-ci-jobs.yaml
1 ---
2
3 ####################
4 # COMMON FUNCTIONS #
5 ####################
6
7 - builder:
8     name: lf-infra-jjbini
9     builders:
10       - config-file-provider:
11           files:
12             - file-id: jjbini
13               target: '$HOME/.config/jenkins_jobs/jenkins_jobs.ini'
14
15 - builder:
16     name: lf-infra-jjbini-sandbox
17     # TODO: Consolidate this into jjbini when JJB2.0 is available.
18     builders:
19       - config-file-provider:
20           files:
21             - file-id: jjbini-sandbox
22               target: '$HOME/.config/jenkins_jobs/jenkins_jobs.ini'
23
24 - lf_packer: &lf_packer_common
25     name: lf-packer-common
26     # Provide configuration common in packer jobs.
27
28     ######################
29     # Default parameters #
30     ######################
31
32     branch: master
33     build-timeout: 90
34     cron: '@monthly'
35     disable-job: false
36     github-url: 'https://github.com'
37     stream: master
38     submodule-recursive: true
39     submodule-timeout: 10
40     packer-cloud-settings: packer-cloud-env
41     packer-version: 1.2.5
42
43     #####################
44     # Job Configuration #
45     #####################
46
47     project-type: freestyle
48     node: '{build-node}'
49     disabled: '{disable-job}'
50
51     properties:
52       - lf-infra-properties:
53           project: '{project}'
54           build-days-to-keep: 7
55
56     parameters:
57       - lf-infra-parameters:
58           project: '{project}'
59           stream: '{stream}'
60           branch: '{branch}'
61           lftools-version: '{lftools-version}'
62       - lf-packer-parameters:
63           packer-version: '{packer-version}'
64
65     wrappers:
66       - lf-infra-wrappers:
67           build-timeout: '{build-timeout}'
68           jenkins-ssh-credential: '{jenkins-ssh-credential}'
69
70     publishers:
71       - lf-infra-publish
72
73 - parameter:
74     name: lf-infra-jjb-parameters
75     parameters:
76       - string:
77           name: JJB_VERSION
78           default: '{jjb-version}'
79           description: Jenkins Job Builder version to download and install.
80       - string:
81           name: XDG_CACHE_HOME
82           default: '{jjb-cache}'
83           description: Jenkins Job Builder cache location.
84
85 - parameter:
86     name: lf-packer-parameters
87     parameters:
88       - string:
89           name: PACKER_VERSION
90           default: '{packer-version}'
91           description: Packer version to download and install.
92
93 - lf_jjb_common: &lf_jjb_common
94     name: lf-jjb-common
95
96     ######################
97     # Default parameters #
98     ######################
99
100     branch: master
101     build-timeout: 10
102     disable-job: false
103     github-url: 'https://github.com'
104     jjb-cache: '$HOME/.cache/jenkins_jobs'
105     jjb-version: 2.2.1
106     stream: master
107     submodule-recursive: true
108     submodule-timeout: 10
109
110     gerrit_trigger_file_paths:
111       - compare-type: REG_EXP
112         pattern: 'jjb/.*'
113       - compare-type: REG_EXP
114         pattern: 'global-jjb'
115       - compare-type: REG_EXP
116         pattern: 'shell/.*'
117
118     # github_included_regions MUST match gerrit_trigger_file_paths
119     github_included_regions:
120       - 'jjb/.*'
121       - 'global-jjb'
122       - 'shell/.*'
123
124     #####################
125     # Job Configuration #
126     #####################
127
128     project-type: freestyle
129     node: '{build-node}'
130     disabled: '{disable-job}'
131
132     properties:
133       - lf-infra-properties:
134           project: '{project}'
135           build-days-to-keep: 7
136
137     parameters:
138       - lf-infra-parameters:
139           project: '{project}'
140           stream: '{stream}'
141           branch: '{branch}'
142           lftools-version: '{lftools-version}'
143       - lf-infra-jjb-parameters:
144           jjb-cache: '{jjb-cache}'
145           jjb-version: '{jjb-version}'
146
147     wrappers:
148       - lf-infra-wrappers:
149           build-timeout: '{build-timeout}'
150           jenkins-ssh-credential: '{jenkins-ssh-credential}'
151
152     publishers:
153       - lf-infra-publish
154
155 ######################
156 # Gerrit Branch Lock #
157 ######################
158
159 - job-template:
160     name: '{project-name}-gerrit-branch-lock-{stream}'
161     id: gerrit-branch-lock
162
163     ######################
164     # Default parameters #
165     ######################
166
167     branch: master
168     disable-job: false
169     git-url: '$GIT_URL/$GERRIT_PROJECT'
170     stream: master
171     submodule-timeout: 10
172     gerrit_merge_triggers:
173       - comment-added-contains-event:
174           comment-contains-value: (un)?lock branch$
175
176     #####################
177     # Job Configuration #
178     #####################
179
180     project-type: freestyle
181     node: '{build-node}'
182     disabled: '{disable-job}'
183
184     properties:
185       - lf-infra-properties:
186           project: '{project}'
187           build-days-to-keep: 1
188
189     parameters:
190       - lf-infra-parameters:
191           project: '{project}'
192           stream: '{stream}'
193           branch: '{branch}'
194           lftools-version: '{lftools-version}'
195
196     wrappers:
197       - lf-infra-wrappers:
198           build-timeout: 5
199           jenkins-ssh-credential: '{jenkins-ssh-credential}'
200
201     scm:
202       - lf-infra-gerrit-scm:
203           git-url: '{git-url}'
204           refspec: ''
205           branch: '{branch}'
206           submodule-recursive: false
207           submodule-timeout: '{submodule-timeout}'
208           choosing-strategy: default
209           jenkins-ssh-credential: '{jenkins-ssh-credential}'
210
211     triggers:
212       - gerrit:
213           server-name: '{gerrit-server-name}'
214           trigger-on: '{obj:gerrit_merge_triggers}'
215           projects:
216             - project-compare-type: ANT
217               project-pattern: '{project}'
218               branches:
219                 - branch-compare-type: ANT
220                   branch-pattern: '**/{branch}'
221
222     builders:
223       - shell: !include-raw-escape: ../shell/gerrit-branch-lock.sh
224
225
226     publishers:
227       - lf-infra-publish
228
229 ##########################################
230 # Jenkins Configuration Management Merge #
231 ##########################################
232
233 - builder:
234     name: lf-jenkins-cfg-clouds
235     builders:
236       - lf-infra-jjbini
237       - inject:
238           properties-content: 'jenkins_silos={jenkins-silos}'
239       - shell: !include-raw-escape: ../shell/jenkins-configure-clouds.sh
240       - shell: rm -f "$HOME/.config/jenkins_jobs/jenkins_jobs.ini"
241
242 - builder:
243     name: lf-jenkins-cfg-global-vars
244     builders:
245       - lf-infra-jjbini
246       - inject:
247           properties-content: 'jenkins_silos={jenkins-silos}'
248       - shell: !include-raw-escape: ../shell/jenkins-configure-global-vars.sh
249       - shell: rm -f "$HOME/.config/jenkins_jobs/jenkins_jobs.ini"
250
251 - lf_jenkins_configuration: &lf_jenkins_cfg_merge
252     name: lf-jenkins-cfg-merge
253
254     ######################
255     # Default parameters #
256     ######################
257
258     branch: master
259     cron: '@daily'
260     disable-job: false
261     git-url: '$GIT_URL/$GERRIT_PROJECT'
262     github-url: 'https://github.com'
263     jenkins-silos: production sandbox
264     submodule-timeout: 10
265
266     gerrit_merge_triggers:
267       - change-merged-event
268       - comment-added-contains-event:
269           comment-contains-value: remerge$
270
271     gerrit_trigger_file_paths:
272       - compare-type: REG_EXP
273         pattern: 'jenkins-config\/.*'
274
275     # github_included_regions MUST match gerrit_trigger_file_paths
276     github_included_regions:
277       - 'jenkins-config\/.*'
278
279     #####################
280     # Job Configuration #
281     #####################
282
283     project-type: freestyle
284     node: '{build-node}'
285     concurrent: false
286     disabled: '{disable-job}'
287
288     properties:
289       - lf-infra-properties:
290           project: '{project}'
291           build-days-to-keep: 1
292
293     parameters:
294       - lf-infra-parameters:
295           project: '{project}'
296           stream: ''
297           branch: master
298           lftools-version: '{lftools-version}'
299
300     wrappers:
301       - lf-infra-wrappers:
302           build-timeout: 10
303           jenkins-ssh-credential: '{jenkins-ssh-credential}'
304
305     builders:
306       - lf-infra-pre-build
307       - lf-jenkins-cfg-global-vars:
308           jenkins-silos: '{jenkins-silos}'
309       - lf-jenkins-cfg-clouds:
310           jenkins-silos: '{jenkins-silos}'
311
312     publishers:
313       - lf-infra-publish
314
315 - job-template:
316     name: '{project-name}-jenkins-cfg-merge'
317     id: gerrit-jenkins-cfg-merge
318     <<: *lf_jenkins_cfg_merge
319
320     scm:
321       - lf-infra-gerrit-scm:
322           git-url: '{git-url}'
323           refspec: 'refs/heads/{branch}'
324           branch: '{branch}'
325           submodule-recursive: true
326           submodule-timeout: '{submodule-timeout}'
327           choosing-strategy: default
328           jenkins-ssh-credential: '{jenkins-ssh-credential}'
329
330     triggers:
331       - timed: '{obj:cron}'
332       - gerrit:
333           server-name: '{gerrit-server-name}'
334           trigger-on: '{obj:gerrit_merge_triggers}'
335           projects:
336             - project-compare-type: ANT
337               project-pattern: '{project}'
338               branches:
339                 - branch-compare-type: ANT
340                   branch-pattern: '**/{branch}'
341               file-paths: '{obj:gerrit_trigger_file_paths}'
342
343 - job-template:
344     name: '{project-name}-jenkins-cfg-merge'
345     id: github-jenkins-cfg-merge
346     <<: *lf_jenkins_cfg_merge
347
348     properties:
349       - lf-infra-properties:
350           project: '{project}'
351           build-days-to-keep: 1
352       - github:
353           url: '{github-url}/{github-org}/{project}'
354
355     scm:
356       - lf-infra-github-scm:
357           url: '{git-clone-url}{github-org}/{project}'
358           refspec: ''
359           branch: 'refs/heads/{branch}'
360           submodule-recursive: true
361           submodule-timeout: '{submodule-timeout}'
362           choosing-strategy: default
363           jenkins-ssh-credential: '{jenkins-ssh-credential}'
364
365     triggers:
366       - timed: '{obj:cron}'
367       - github
368       - pollscm:
369           cron: ''
370       - github-pull-request:
371           trigger-phrase: '^remerge$'
372           only-trigger-phrase: true
373           status-context: 'Jenkins CFG Merge'
374           permit-all: true
375           github-hooks: true
376           org-list:
377             - '{github-org}'
378           white-list: '{obj:github_pr_whitelist}'
379           admin-list: '{obj:github_pr_admin_list}'
380           included-regions: '{obj:github_included_regions}'
381           white-list-target-branches:
382             - '{branch}'
383
384 ###########################################
385 # Jenkins Configuration Management Verify #
386 ###########################################
387
388 - lf_jenkins_configuration: &lf_jenkins_cfg_verify
389     name: lf-jenkins-cfg-verify
390
391     ######################
392     # Default parameters #
393     ######################
394
395     branch: master
396     build-days-to-keep: 7
397     disable-job: false
398     git-url: '$GIT_URL/$GERRIT_PROJECT'
399     github-url: 'https://github.com'
400     openstack-cloud: vex
401     submodule-timeout: 10
402
403     gerrit_verify_triggers:
404       - patchset-created-event:
405           exclude-drafts: true
406           exclude-trivial-rebase: false
407           exclude-no-code-change: false
408       - draft-published-event
409       - comment-added-contains-event:
410           comment-contains-value: '^Patch Set[ ]+[0-9]+:([ ]+|[\n]+)(recheck|reverify)$'
411
412     gerrit_trigger_file_paths:
413       - compare-type: REG_EXP
414         pattern: 'jenkins-config\/.*'
415
416     # github_included_regions MUST match gerrit_trigger_file_paths
417     github_included_regions:
418       - 'jenkins-config\/.*'
419
420     #####################
421     # Job Configuration #
422     #####################
423
424     project-type: freestyle
425     node: '{build-node}'
426     concurrent: true
427     disabled: '{disable-job}'
428
429     properties:
430       - lf-infra-properties:
431           project: '{project}'
432           build-days-to-keep: 1
433
434     parameters:
435       - lf-infra-parameters:
436           project: '{project}'
437           stream: ''
438           branch: master
439           lftools-version: '{lftools-version}'
440
441     wrappers:
442       - lf-infra-wrappers:
443           build-timeout: 10
444           jenkins-ssh-credential: '{jenkins-ssh-credential}'
445       - config-file-provider:
446           # Listed after to override openstack-infra-wrappers clouds.yaml
447           # definition
448           files:
449             - file-id: clouds-yaml
450               target: '$HOME/.config/openstack/clouds.yaml'
451             - file-id: npmrc
452               target: '$HOME/.npmrc'
453             - file-id: pipconf
454               target: '$HOME/.config/pip/pip.conf'
455
456     builders:
457       - lf-infra-pre-build
458       - inject:
459           properties-content: OS_CLOUD={openstack-cloud}
460       - shell: !include-raw-escape: ../shell/jenkins-verify-images.sh
461
462     publishers:
463       - lf-infra-publish
464
465 - job-template:
466     name: '{project-name}-jenkins-cfg-verify'
467     id: gerrit-jenkins-cfg-verify
468     <<: *lf_jenkins_cfg_verify
469
470     scm:
471       - lf-infra-gerrit-scm:
472           git-url: '{git-url}'
473           refspec: 'refs/heads/{branch}'
474           branch: '{branch}'
475           submodule-recursive: true
476           submodule-timeout: '{submodule-timeout}'
477           choosing-strategy: default
478           jenkins-ssh-credential: '{jenkins-ssh-credential}'
479
480     triggers:
481       - gerrit:
482           server-name: '{gerrit-server-name}'
483           trigger-on: '{obj:gerrit_verify_triggers}'
484           projects:
485             - project-compare-type: ANT
486               project-pattern: '{project}'
487               branches:
488                 - branch-compare-type: ANT
489                   branch-pattern: '**/{branch}'
490               file-paths: '{obj:gerrit_trigger_file_paths}'
491
492 - job-template:
493     name: '{project-name}-jenkins-cfg-verify'
494     id: github-jenkins-cfg-verify
495     <<: *lf_jenkins_cfg_verify
496
497     properties:
498       - github:
499           url: '{github-url}/{github-org}/{project}'
500
501     scm:
502       - lf-infra-github-scm:
503           url: '{git-clone-url}{github-org}/{project}'
504           refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
505           branch: '$sha1'
506           submodule-recursive: '{submodule-recursive}'
507           submodule-timeout: '{submodule-timeout}'
508           choosing-strategy: default
509           jenkins-ssh-credential: '{jenkins-ssh-credential}'
510
511     triggers:
512       - github-pull-request:
513           trigger-phrase: '^(recheck|reverify)$'
514           only-trigger-phrase: false
515           status-context: 'Jenkins CFG Verify'
516           permit-all: true
517           github-hooks: true
518           included-regions: '{obj:github_included_regions}'
519           white-list-target-branches:
520             - '{branch}'
521
522 ###########################
523 # JENKINS SANDBOX CLEANUP #
524 ###########################
525
526 - lf_jenkins_sandbox_cleanup: &lf_jenkins_sandbox_cleanup
527     name: lf-jenkins-sandbox-cleanup
528
529     ######################
530     # Default parameters #
531     ######################
532
533     build-timeout: 30
534     # Run every Saturday at 08:00 UTC
535     cron: '0 8 * * 6'
536     disable-job: false
537
538     #####################
539     # Job Configuration #
540     #####################
541
542     project-type: freestyle
543     node: '{build-node}'
544     concurrent: true
545     disabled: '{disable-job}'
546
547     parameters:
548       - lf-infra-jjb-parameters:
549           jjb-cache: '{jjb-cache}'
550           jjb-version: '{jjb-version}'
551
552     triggers:
553       - timed: '{obj:cron}'
554
555     builders:
556       - lf-infra-jjbini
557       - shell: !include-raw-escape:
558           - ../shell/jjb-install.sh
559           - ../shell/jenkins-sandbox-cleanup.sh
560           - ../shell/jjb-cleanup.sh
561
562 - job-template:
563     name: '{project-name}-jenkins-sandbox-cleanup'
564     id: gerrit-jenkins-sandbox-cleanup
565     <<: *lf_jjb_common
566     # yamllint disable-line rule:key-duplicates
567     <<: *lf_jenkins_sandbox_cleanup
568
569 - job-template:
570     name: '{project-name}-jenkins-sandbox-cleanup'
571     id: github-jenkins-sandbox-cleanup
572     <<: *lf_jjb_common
573     # yamllint disable-line rule:key-duplicates
574     <<: *lf_jenkins_sandbox_cleanup
575
576
577 ##################
578 # JJB DEPLOY JOB #
579 ##################
580
581 - lf_jjb_deploy_job: &lf_jjb_deploy_job
582     name: lf-jjb-deploy-job
583
584     ######################
585     # Default parameters #
586     ######################
587
588     branch: master
589     disable-job: false
590     # jjb-deploy should always clone $PROJECT regardless of what
591     # $GERRIT_PROJECT triggered the job.
592     git-url: '$GIT_URL/$PROJECT'
593     github-url: 'https://github.com'
594     stream: master
595     submodule-timeout: 10
596     gerrit_jjb_deploy_job_triggers:
597       - comment-added-contains-event:
598           comment-contains-value: 'jjb-deploy[:]* (?!\*+$).+$'
599
600     #####################
601     # Job Configuration #
602     #####################
603
604     project-type: freestyle
605     node: '{build-node}'
606     concurrent: true
607     disabled: '{disable-job}'
608
609     properties:
610       - lf-infra-properties:
611           project: '{project}'
612           build-days-to-keep: 1
613
614     parameters:
615       - lf-infra-parameters:
616           project: '{project}'
617           stream: '{stream}'
618           branch: '{branch}'
619           lftools-version: '{lftools-version}'
620
621     wrappers:
622       - lf-infra-wrappers:
623           build-timeout: 5
624           jenkins-ssh-credential: '{jenkins-ssh-credential}'
625
626     builders:
627       - lf-pip-install:
628           pip-packages: jenkins-job-builder
629       - lf-infra-jjbini-sandbox
630       - shell: !include-raw-escape: ../shell/jjb-deploy-job.sh
631
632     publishers:
633       - lf-infra-publish
634
635 - job-template:
636     name: '{project-name}-jjb-deploy-job'
637     id: gerrit-jjb-deploy-job
638     <<: *lf_jjb_deploy_job
639
640     scm:
641       - lf-infra-gerrit-scm:
642           git-url: '{git-url}'
643           refspec: 'refs/heads/{branch}'
644           branch: '{branch}'
645           submodule-recursive: true
646           submodule-timeout: '{submodule-timeout}'
647           choosing-strategy: default
648           jenkins-ssh-credential: '{jenkins-ssh-credential}'
649
650     triggers:
651       - gerrit:
652           server-name: '{gerrit-server-name}'
653           trigger-on: '{obj:gerrit_jjb_deploy_job_triggers}'
654           projects:
655             - project-compare-type: ANT
656               project-pattern: '**'
657               branches:
658                 - branch-compare-type: ANT
659                   branch-pattern: '**'
660           skip-vote:
661             success: true
662             failed: true
663             unstable: true
664             notbuilt: true
665
666 - job-template:
667     name: '{project-name}-jjb-deploy-job'
668     id: github-jjb-deploy-job
669     <<: *lf_jjb_deploy_job
670
671     properties:
672       - lf-infra-properties:
673           project: '{project}'
674           build-days-to-keep: 1
675       - github:
676           url: '{github-url}/{github-org}/{project}'
677
678     scm:
679       - lf-infra-github-scm:
680           url: '{git-clone-url}{github-org}/{project}'
681           refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
682           branch: '$sha1'
683           submodule-recursive: true
684           submodule-timeout: '{submodule-timeout}'
685           choosing-strategy: default
686           jenkins-ssh-credential: '{jenkins-ssh-credential}'
687
688     triggers:
689       - github-pull-request:
690           trigger-phrase: '^jjb-deploy (?!\*+$).+$'
691           only-trigger-phrase: true
692           status-context: 'JJB Deploy Job'
693           permit-all: true
694           github-hooks: true
695           white-list-target-branches:
696             - '{branch}'
697
698 #############
699 # JJB Merge #
700 #############
701
702 - lf_jjb_merge: &lf_jjb_merge
703     name: lf-jjb-merge
704
705     ######################
706     # Default parameters #
707     ######################
708
709     gerrit_merge_triggers:
710       - change-merged-event
711       - comment-added-contains-event:
712           comment-contains-value: remerge$
713
714     #####################
715     # Job Configuration #
716     #####################
717
718     builders:
719       - lf-infra-pre-build
720       - lf-infra-jjbini
721       - shell: !include-raw-escape:
722           - ../shell/jjb-install.sh
723           - ../shell/jjb-merge-job.sh
724           - ../shell/jjb-cleanup.sh
725
726 - job-template:
727     name: '{project-name}-jjb-merge'
728     id: gerrit-jjb-merge
729     <<: *lf_jjb_common
730     # yamllint disable-line rule:key-duplicates
731     <<: *lf_jjb_merge
732
733     git-url: '$GIT_URL/$GERRIT_PROJECT'
734
735     scm:
736       - lf-infra-gerrit-scm:
737           git-url: '{git-url}'
738           refspec: ''
739           branch: '{branch}'
740           submodule-recursive: '{submodule-recursive}'
741           submodule-timeout: '{submodule-timeout}'
742           choosing-strategy: default
743           jenkins-ssh-credential: '{jenkins-ssh-credential}'
744
745     triggers:
746       - gerrit:
747           server-name: '{gerrit-server-name}'
748           trigger-on: '{obj:gerrit_merge_triggers}'
749           projects:
750             - project-compare-type: ANT
751               project-pattern: '{project}'
752               branches:
753                 - branch-compare-type: ANT
754                   branch-pattern: '**/{branch}'
755               file-paths: '{obj:gerrit_trigger_file_paths}'
756
757 - job-template:
758     name: '{project-name}-jjb-merge'
759     id: github-jjb-merge
760     <<: *lf_jjb_common
761     # yamllint disable-line rule:key-duplicates
762     <<: *lf_jjb_merge
763
764     #####################
765     # Job Configuration #
766     #####################
767
768     properties:
769       - lf-infra-properties:
770           project: '{project}'
771           build-days-to-keep: 7
772       - github:
773           url: '{github-url}/{github-org}/{project}'
774
775     scm:
776       - lf-infra-github-scm:
777           url: '{git-clone-url}{github-org}/{project}'
778           refspec: ''
779           branch: 'refs/heads/{branch}'
780           submodule-recursive: '{submodule-recursive}'
781           submodule-timeout: '{submodule-timeout}'
782           choosing-strategy: default
783           jenkins-ssh-credential: '{jenkins-ssh-credential}'
784
785     triggers:
786       - github
787       - pollscm:
788           cron: ''
789       - github-pull-request:
790           trigger-phrase: '^remerge$'
791           only-trigger-phrase: true
792           status-context: 'JJB Merge'
793           permit-all: true
794           github-hooks: true
795           org-list:
796             - '{github-org}'
797           white-list: '{obj:github_pr_whitelist}'
798           admin-list: '{obj:github_pr_admin_list}'
799           included-regions: '{obj:github_included_regions}'
800           white-list-target-branches:
801             - '{branch}'
802
803 ##############
804 # JJB Verify #
805 ##############
806
807 - lf_jjb_verify: &lf_jjb_verify
808     name: lf-jjb-verify
809
810     ######################
811     # Default parameters #
812     ######################
813
814     gerrit_verify_triggers:
815       - patchset-created-event:
816           exclude-drafts: true
817           exclude-trivial-rebase: false
818           exclude-no-code-change: false
819       - draft-published-event
820       - comment-added-contains-event:
821           comment-contains-value: '^Patch Set[ ]+[0-9]+:([ ]+|[\n]+)(recheck|reverify)$'
822
823     #####################
824     # Job Configuration #
825     #####################
826
827     concurrent: true
828
829     builders:
830       - lf-infra-pre-build
831       - lf-infra-jjbini
832       - shell: !include-raw-escape:
833           - ../shell/git-validate-jira-urls.sh
834           - ../shell/jjb-install.sh
835           - ../shell/jjb-verify-job.sh
836           - ../shell/jjb-check-unicode.sh
837           - ../shell/jjb-cleanup.sh
838       - lf-infra-gpg-verify-git-signature
839
840 - job-template:
841     name: '{project-name}-jjb-verify'
842     id: gerrit-jjb-verify
843     <<: *lf_jjb_common
844     # yamllint disable-line rule:key-duplicates
845     <<: *lf_jjb_verify
846
847     ######################
848     # Default parameters #
849     ######################
850
851     git-url: '$GIT_URL/$GERRIT_PROJECT'
852
853     #####################
854     # Job Configuration #
855     #####################
856
857     scm:
858       - lf-infra-gerrit-scm:
859           git-url: '{git-url}'
860           refspec: '$GERRIT_REFSPEC'
861           branch: '$GERRIT_BRANCH'
862           submodule-recursive: '{submodule-recursive}'
863           submodule-timeout: '{submodule-timeout}'
864           choosing-strategy: gerrit
865           jenkins-ssh-credential: '{jenkins-ssh-credential}'
866
867     triggers:
868       - gerrit:
869           server-name: '{gerrit-server-name}'
870           trigger-on: '{obj:gerrit_verify_triggers}'
871           projects:
872             - project-compare-type: ANT
873               project-pattern: '{project}'
874               branches:
875                 - branch-compare-type: ANT
876                   branch-pattern: '**/{branch}'
877               file-paths: '{obj:gerrit_trigger_file_paths}'
878
879 - job-template:
880     name: '{project-name}-jjb-verify'
881     id: github-jjb-verify
882     <<: *lf_jjb_common
883     # yamllint disable-line rule:key-duplicates
884     <<: *lf_jjb_verify
885
886     #####################
887     # Job Configuration #
888     #####################
889
890     properties:
891       - lf-infra-properties:
892           project: '{project}'
893           build-days-to-keep: 7
894       - github:
895           url: '{github-url}/{github-org}/{project}'
896
897     scm:
898       - lf-infra-github-scm:
899           url: '{git-clone-url}{github-org}/{project}'
900           refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
901           branch: '$sha1'
902           submodule-recursive: '{submodule-recursive}'
903           submodule-timeout: '{submodule-timeout}'
904           choosing-strategy: default
905           jenkins-ssh-credential: '{jenkins-ssh-credential}'
906
907     triggers:
908       - github-pull-request:
909           trigger-phrase: '^(recheck|reverify)$'
910           only-trigger-phrase: false
911           status-context: 'JJB Verify'
912           permit-all: true
913           github-hooks: true
914           included-regions: '{obj:github_included_regions}'
915           white-list-target-branches:
916             - '{branch}'
917
918 ############################
919 # JJB Verify Upstream GJJB #
920 ############################
921
922 - lf_jjb_verify: &lf_jjb_verify_upstream_gjjb
923     name: lf-jjb-verify-upstream-gjjb
924
925     #####################
926     # Job Configuration #
927     #####################
928
929     concurrent: true
930
931     builders:
932       - shell: |
933           cd global-jjb
934           git fetch https://gerrit.linuxfoundation.org/infra/releng/global-jjb $GERRIT_REFSPEC
935           git cherry-pick FETCH_HEAD
936       - lf-infra-jjbini
937       - shell: !include-raw-escape:
938           - ../shell/git-validate-jira-urls.sh
939           - ../shell/jjb-install.sh
940           - ../shell/jjb-verify-job.sh
941           - ../shell/jjb-check-unicode.sh
942           - ../shell/jjb-cleanup.sh
943       - lf-infra-gpg-verify-git-signature
944
945 - job-template:
946     name: '{project-name}-jjb-verify-upstream-gjjb'
947     id: gerrit-jjb-verify-upstream-gjjb
948     <<: *lf_jjb_common
949     # yamllint disable-line rule:key-duplicates
950     <<: *lf_jjb_verify_upstream_gjjb
951
952     ######################
953     # Default parameters #
954     ######################
955
956     git-url: '$GIT_URL/$PROJECT'
957     submodule-timeout: 10
958
959     #####################
960     # Job Configuration #
961     #####################
962
963     scm:
964       - lf-infra-gerrit-scm:
965           git-url: '{git-url}'
966           refspec: ''
967           branch: 'master'
968           submodule-recursive: true
969           submodule-timeout: '{submodule-timeout}'
970           choosing-strategy: default
971           jenkins-ssh-credential: '{jenkins-ssh-credential}'
972
973     triggers:
974       - gerrit:
975           server-name: 'LinuxFoundation'
976           trigger-on:
977             - patchset-created-event:
978                 exclude-drafts: true
979                 exclude-trivial-rebase: false
980                 exclude-no-code-change: false
981             - draft-published-event
982             - comment-added-contains-event:
983                 comment-contains-value: '^Patch Set[ ]+[0-9]+:([ ]+|[\n]+)(recheck|reverify)$'
984           projects:
985             - project-compare-type: ANT
986               project-pattern: 'releng/global-jjb'
987               branches:
988                 - branch-compare-type: ANT
989                   branch-pattern: '**/master'
990           override-votes: true
991           gerrit-build-failed-codereview-value: -1
992           gerrit-build-failed-verified-value: 0
993           gerrit-build-successful-codereview-value: 1
994           gerrit-build-successful-verified-value: 0
995
996 #################
997 # License Check #
998 #################
999
1000 - lf_license_check: &lf_license_check
1001     name: lf-license-check
1002
1003     ######################
1004     # Default parameters #
1005     ######################
1006
1007     branch: master
1008     build-days-to-keep: 7
1009     build-timeout: 15
1010     disable-job: false
1011     file-patterns: >
1012         *.go
1013         *.groovy
1014         *.java
1015         *.py
1016         *.sh
1017     git-url: '$GIT_URL/$PROJECT'
1018     github-url: 'https://github.com'
1019     lhc-version: 0.2.0
1020     license-exclude-paths: ''
1021     licenses-allowed: Apache-2.0,EPL-1.0,MIT
1022     project-pattern: '**'
1023     spdx-disable: false
1024     stream: master
1025     submodule-timeout: 10
1026
1027     #####################
1028     # Job Configuration #
1029     #####################
1030
1031     project-type: freestyle
1032     node: '{build-node}'
1033     concurrent: true
1034     disabled: '{disable-job}'
1035
1036     properties:
1037       - lf-infra-properties:
1038           build-days-to-keep: '{build-days-to-keep}'
1039
1040     parameters:
1041       - lf-infra-parameters:
1042           project: '{project}'
1043           branch: '{branch}'
1044           stream: '{stream}'
1045           lftools-version: '{lftools-version}'
1046
1047     wrappers:
1048       - lf-infra-wrappers:
1049           build-timeout: '{build-timeout}'
1050           jenkins-ssh-credential: '{jenkins-ssh-credential}'
1051
1052     builders:
1053       - lf-license-check:
1054           file-patterns: '{file-patterns}'
1055           spdx-disable: '{spdx-disable}'
1056           lhc-version: '{lhc-version}'
1057           license-exclude-paths: '{license-exclude-paths}'
1058           licenses-allowed: '{licenses-allowed}'
1059
1060     publishers:
1061       - lf-infra-publish
1062
1063 - job-template:
1064     name: '{project-name}-license-check'
1065     id: gerrit-license-check
1066     <<: *lf_license_check
1067
1068     git-url: '$GIT_URL/$GERRIT_PROJECT'
1069
1070     scm:
1071       - lf-infra-gerrit-scm:
1072           git-url: '{git-url}'
1073           refspec: '$GERRIT_REFSPEC'
1074           branch: '$GERRIT_BRANCH'
1075           # Submodules are out of the project's control
1076           submodule-recursive: false
1077           submodule-timeout: '{submodule-timeout}'
1078           choosing-strategy: gerrit
1079           jenkins-ssh-credential: '{jenkins-ssh-credential}'
1080
1081     triggers:
1082       - gerrit:
1083           server-name: '{gerrit-server-name}'
1084           # Trigger should not be overridable as we want to always run
1085           trigger-on:
1086             - patchset-created-event:
1087                 exclude-drafts: false
1088                 exclude-trivial-rebase: false
1089                 exclude-no-code-change: false
1090             - draft-published-event
1091             - comment-added-contains-event:
1092                 comment-contains-value: recheck$
1093           projects:
1094             - project-compare-type: ANT
1095               project-pattern: '{project-pattern}'
1096               branches:
1097                 - branch-compare-type: ANT
1098                   branch-pattern: '**'
1099
1100 - job-template:
1101     name: '{project-name}-license-check'
1102     id: github-license-check
1103     <<: *lf_license_check
1104
1105     properties:
1106       - lf-infra-properties:
1107           build-days-to-keep: '{build-days-to-keep}'
1108       - github:
1109           url: '{github-url}/{github-org}/{project}'
1110
1111     scm:
1112       - lf-infra-github-scm:
1113           url: '{git-clone-url}{github-org}/{project}'
1114           refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
1115           branch: '$sha1'
1116           # Submodules are out of the project's control
1117           submodule-recursive: false
1118           submodule-timeout: '{submodule-timeout}'
1119           choosing-strategy: default
1120           jenkins-ssh-credential: '{jenkins-ssh-credential}'
1121
1122     triggers:
1123       - github-pull-request:
1124           trigger-phrase: '^recheck$'
1125           only-trigger-phrase: false
1126           status-context: 'License Check'
1127           permit-all: true
1128           github-hooks: true
1129           white-list-target-branches:
1130             - '{branch}'
1131
1132 ####################
1133 # Info YAML Verify #
1134 ####################
1135
1136 - lf_info_yaml_verify: &lf_info_yaml_verify
1137     name: lf-info-yaml-verify
1138
1139     ######################
1140     # Default parameters #
1141     ######################
1142
1143     gerrit_verify_triggers:
1144       - patchset-created-event:
1145           exclude-drafts: true
1146           exclude-trivial-rebase: false
1147           exclude-no-code-change: false
1148       - draft-published-event
1149       - comment-added-contains-event:
1150           comment-contains-value: '^Patch Set[ ]+[0-9]+:([ ]+|[\n]+)(recheck|reverify)$'
1151
1152     #####################
1153     # Job Configuration #
1154     #####################
1155
1156     concurrent: true
1157
1158     builders:
1159       - shell: !include-raw-escape:
1160           - ../shell/git-validate-info-yaml.sh
1161           - ../shell/info-file-validate.sh
1162
1163 - job-template:
1164     name: '{project-name}-info-yaml-verify'
1165     id: gerrit-info-yaml-verify
1166     <<: *lf_jjb_common
1167     # yamllint disable-line rule:key-duplicates
1168     <<: *lf_info_yaml_verify
1169
1170     git-url: '$GIT_URL/$GERRIT_PROJECT'
1171
1172     scm:
1173       - lf-infra-gerrit-scm:
1174           git-url: '{git-url}'
1175           refspec: '$GERRIT_REFSPEC'
1176           branch: '$GERRIT_BRANCH'
1177           submodule-recursive: '{submodule-recursive}'
1178           submodule-timeout: '{submodule-timeout}'
1179           choosing-strategy: gerrit
1180           jenkins-ssh-credential: '{jenkins-ssh-credential}'
1181
1182     triggers:
1183       - gerrit:
1184           server-name: '{gerrit-server-name}'
1185           trigger-on: '{obj:gerrit_verify_triggers}'
1186           projects:
1187             - project-compare-type: ANT
1188               project-pattern: '{project}'
1189               branches:
1190                 - branch-compare-type: ANT
1191                   branch-pattern: '**/{branch}'
1192               file-paths:
1193                 - compare-type: REG_EXP
1194                   pattern: 'INFO.yaml'
1195
1196 - job-template:
1197     name: '{project-name}-info-yaml-verify'
1198     id: github-info-yaml-verify
1199     <<: *lf_jjb_common
1200     # yamllint disable-line rule:key-duplicates
1201     <<: *lf_info_yaml_verify
1202
1203     github-url: 'https://github.com'
1204     properties:
1205       - github:
1206           url: '{github-url}/{github-org}/{project}'
1207
1208     scm:
1209       - lf-infra-github-scm:
1210           url: '{git-clone-url}{github-org}/{project}'
1211           refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
1212           branch: '$sha1'
1213           submodule-recursive: '{submodule-recursive}'
1214           submodule-timeout: '{submodule-timeout}'
1215           choosing-strategy: default
1216           jenkins-ssh-credential: '{jenkins-ssh-credential}'
1217
1218     triggers:
1219       - github-pull-request:
1220           trigger-phrase: '^(recheck|reverify)$'
1221           only-trigger-phrase: false
1222           status-context: 'INFO File Verify'
1223           permit-all: true
1224           github-hooks: true
1225           # included-regions MUST match gerrit file-paths
1226           included-regions: 'INFO.yaml'
1227           white-list-target-branches:
1228             - '{branch}'
1229
1230 ##################
1231 # OPENSTACK CRON #
1232 ##################
1233
1234 - lf_openstack_cron: &lf_openstack_cron
1235     name: lf-openstack-cron
1236
1237     ######################
1238     # Default parameters #
1239     ######################
1240
1241     branch: master
1242     build-days-to-keep: 7
1243     build-timeout: 10
1244     cron: '@hourly'
1245     disable-job: false
1246     git-url: '$GIT_URL/$PROJECT'
1247     github-url: 'https://github.com'
1248     openstack-cloud: vex
1249     openstack-image-cleanup: true
1250     openstack-image-cleanup-age: 30
1251     openstack-image-protect: true
1252     openstack-server-cleanup: true
1253     openstack-stack-cleanup: true
1254     openstack-volume-cleanup: true
1255     stream: master
1256     submodule-timeout: 10
1257
1258     #####################
1259     # Job Configuration #
1260     #####################
1261
1262     project-type: freestyle
1263     node: '{build-node}'
1264     concurrent: false
1265     disabled: '{disable-job}'
1266
1267     properties:
1268       - lf-infra-properties:
1269           build-days-to-keep: '{build-days-to-keep}'
1270
1271     parameters:
1272       - lf-infra-parameters:
1273           project: '{project}'
1274           stream: '{stream}'
1275           branch: '{branch}'
1276           lftools-version: '{lftools-version}'
1277       - string:
1278           name: JENKINS_URLS
1279           default: '{jenkins-urls}'
1280           description: |
1281               Space separated list of Jenkins URLs to check for active builds.
1282
1283     wrappers:
1284       - lf-infra-wrappers:
1285           build-timeout: '{build-timeout}'
1286           jenkins-ssh-credential: '{jenkins-ssh-credential}'
1287       # Listed after to override openstack-infra-wrappers clouds.yaml definition
1288       - config-file-provider:
1289           files:
1290             - file-id: clouds-yaml
1291               target: '$HOME/.config/openstack/clouds.yaml'
1292             - file-id: npmrc
1293               target: '$HOME/.npmrc'
1294             - file-id: pipconf
1295               target: '$HOME/.config/pip/pip.conf'
1296
1297     triggers:
1298       - timed: '{obj:cron}'
1299
1300     builders:
1301       - lf-infra-pre-build
1302       - inject:
1303           properties-content: OS_CLOUD={openstack-cloud}
1304       # Stacks
1305       - conditional-step:
1306           condition-kind: boolean-expression
1307           condition-expression: '{openstack-stack-cleanup}'
1308           steps:
1309             - shell: !include-raw-escape: ../shell/openstack-cleanup-orphaned-stacks.sh
1310       # Servers
1311       - conditional-step:
1312           condition-kind: boolean-expression
1313           condition-expression: '{openstack-server-cleanup}'
1314           steps:
1315             - shell: !include-raw-escape: ../shell/openstack-cleanup-orphaned-servers.sh
1316       # Volumes
1317       - conditional-step:
1318           condition-kind: boolean-expression
1319           condition-expression: '{openstack-volume-cleanup}'
1320           steps:
1321             - shell: !include-raw-escape: ../shell/openstack-cleanup-orphaned-volumes.sh
1322       # Images
1323       - conditional-step:
1324           condition-kind: boolean-expression
1325           condition-expression: '{openstack-image-protect}'
1326           steps:
1327             - shell: !include-raw-escape: ../shell/openstack-protect-in-use-images.sh
1328       - conditional-step:
1329           condition-kind: boolean-expression
1330           condition-expression: '{openstack-image-cleanup}'
1331           steps:
1332             - inject:
1333                 properties-content: OS_IMAGE_CLEANUP_AGE={openstack-image-cleanup-age}
1334             - shell: !include-raw-escape: ../shell/openstack-cleanup-old-images.sh
1335
1336     publishers:
1337       - lf-infra-publish
1338
1339 - job-template:
1340     name: '{project-name}-openstack-cron'
1341     id: gerrit-openstack-cron
1342     <<: *lf_openstack_cron
1343
1344     scm:
1345       - lf-infra-gerrit-scm:
1346           git-url: '{git-url}'
1347           refspec: 'refs/heads/{branch}'
1348           branch: '{branch}'
1349           submodule-recursive: true
1350           submodule-timeout: '{submodule-timeout}'
1351           choosing-strategy: default
1352           jenkins-ssh-credential: '{jenkins-ssh-credential}'
1353
1354 - job-template:
1355     name: '{project-name}-openstack-cron'
1356     id: github-openstack-cron
1357     <<: *lf_openstack_cron
1358
1359     scm:
1360       - lf-infra-github-scm:
1361           url: '{git-clone-url}{github-org}/{project}'
1362           refspec: ''
1363           branch: 'refs/heads/{branch}'
1364           submodule-recursive: true
1365           submodule-timeout: '{submodule-timeout}'
1366           choosing-strategy: default
1367           jenkins-ssh-credential: '{jenkins-ssh-credential}'
1368
1369 ################
1370 # Packer Merge #
1371 ################
1372
1373 - lf_packer_merge: &lf_packer_merge
1374     name: lf-packer-merge
1375
1376     ######################
1377     # Default parameters #
1378     ######################
1379
1380     openstack: true
1381     openstack-cloud: vex
1382
1383     #####################
1384     # Job Configuration #
1385     #####################
1386
1387     parameters:
1388       - lf-infra-parameters:
1389           project: '{project}'
1390           stream: '{stream}'
1391           branch: '{branch}'
1392           lftools-version: '{lftools-version}'
1393       - lf-packer-parameters:
1394           packer-version: '{packer-version}'
1395
1396     builders:
1397       - lf-infra-packer-build:
1398           openstack: '{openstack}'
1399           openstack-cloud: '{openstack-cloud}'
1400           packer-cloud-settings: '{packer-cloud-settings}'
1401           packer-version: '{packer-version}'
1402           platform: '{platforms}'
1403           template: '{templates}'
1404
1405 - job-template:
1406     name: '{project-name}-packer-merge-{platforms}-{templates}'
1407     id: gerrit-packer-merge
1408     <<: *lf_packer_common
1409     # yamllint disable-line rule:key-duplicates
1410     <<: *lf_packer_merge
1411
1412     ######################
1413     # Default parameters #
1414     ######################
1415
1416     git-url: '$GIT_URL/$GERRIT_PROJECT'
1417
1418     gerrit_merge_triggers:
1419       - change-merged-event
1420       - comment-added-contains-event:
1421           comment-contains-value: remerge$
1422
1423     #####################
1424     # Job Configuration #
1425     #####################
1426
1427     scm:
1428       - lf-infra-gerrit-scm:
1429           git-url: '{git-url}'
1430           refspec: '$GERRIT_REFSPEC'
1431           branch: '$GERRIT_BRANCH'
1432           submodule-recursive: '{submodule-recursive}'
1433           submodule-timeout: '{submodule-timeout}'
1434           choosing-strategy: gerrit
1435           jenkins-ssh-credential: '{jenkins-ssh-credential}'
1436
1437     triggers:
1438       - timed: '{obj:cron}'
1439       - gerrit:
1440           server-name: '{gerrit-server-name}'
1441           trigger-on: '{obj:gerrit_merge_triggers}'
1442           projects:
1443             - project-compare-type: ANT
1444               project-pattern: '{project}'
1445               branches:
1446                 - branch-compare-type: ANT
1447                   branch-pattern: '**/{branch}'
1448               file-paths:
1449                 - compare-type: REG_EXP
1450                   pattern: 'packer\/provision\/.*\.sh'
1451                 - compare-type: REG_EXP
1452                   pattern: 'packer\/provision\/.*\.bat'
1453                 - compare-type: REG_EXP
1454                   pattern: 'packer\/provision\/.*\.ps1'
1455                 - compare-type: REG_EXP
1456                   pattern: 'packer\/provision\/{templates}\.yaml'
1457                 - compare-type: REG_EXP
1458                   pattern: 'packer\/provision\/local-{templates}\.yaml'
1459                 - compare-type: REG_EXP
1460                   pattern: 'packer\/templates\/{templates}\.json'
1461                 - compare-type: REG_EXP
1462                   pattern: 'packer\/vars\/{platforms}\.json'
1463
1464 - job-template:
1465     name: '{project-name}-packer-merge-{platforms}-{templates}'
1466     id: github-packer-merge
1467     <<: *lf_packer_common
1468     # yamllint disable-line rule:key-duplicates
1469     <<: *lf_packer_merge
1470
1471     #####################
1472     # Job Configuration #
1473     #####################
1474
1475     properties:
1476       - lf-infra-properties:
1477           project: '{project}'
1478           build-days-to-keep: 7
1479       - github:
1480           url: '{github-url}/{github-org}/{project}'
1481
1482     scm:
1483       - lf-infra-github-scm:
1484           url: '{git-clone-url}{github-org}/{project}'
1485           refspec: ''
1486           branch: 'refs/heads/{branch}'
1487           submodule-recursive: '{submodule-recursive}'
1488           submodule-timeout: '{submodule-timeout}'
1489           choosing-strategy: default
1490           jenkins-ssh-credential: '{jenkins-ssh-credential}'
1491
1492     triggers:
1493       - timed: '{obj:cron}'
1494       - github
1495       - pollscm:
1496           cron: ''
1497
1498       - github-pull-request:
1499           trigger-phrase: '^remerge$'
1500           only-trigger-phrase: true
1501           status-context: 'Packer {platforms}-{templates} Merge'
1502           permit-all: true
1503           github-hooks: true
1504           org-list:
1505             - '{github-org}'
1506           white-list: '{obj:github_pr_whitelist}'
1507           admin-list: '{obj:github_pr_admin_list}'
1508           # included-regions MUST match Gerrit Trigger file-paths
1509           included-regions:
1510             - 'packer\/provision\/.*\.sh'
1511             - 'packer\/provision\/.*\.bat'
1512             - 'packer\/provision\/.*\.ps1'
1513             - 'packer\/provision\/{templates}\.yaml'
1514             - 'packer\/provision\/local-{templates}\.yaml'
1515             - 'packer\/templates\/{templates}\.json'
1516             - 'packer\/vars\/{platforms}\.json'
1517           white-list-target-branches:
1518             - '{branch}'
1519
1520 #################
1521 # Packer Verify #
1522 #################
1523
1524 - lf_packer_verify: &lf_packer_verify
1525     name: lf-packer-verify
1526
1527     ######################
1528     # Default parameters #
1529     ######################
1530
1531     build-timeout: 10
1532     openstack: true
1533     openstack-cloud: vex
1534
1535     gerrit_verify_triggers:
1536       - patchset-created-event:
1537           exclude-drafts: true
1538           exclude-trivial-rebase: false
1539           exclude-no-code-change: false
1540       - draft-published-event
1541       - comment-added-contains-event:
1542           comment-contains-value: '^Patch Set[ ]+[0-9]+:([ ]+|[\n]+)(recheck|reverify)$'
1543
1544     gerrit_trigger_file_paths:
1545       - compare-type: REG_EXP
1546         pattern: 'packer\/.*'
1547
1548     # github_included_regions MUST match gerrit_trigger_file_paths
1549     github_included_regions:
1550       - 'packer\/.*'
1551
1552     #####################
1553     # Job Configuration #
1554     #####################
1555
1556     concurrent: true
1557
1558     builders:
1559       - lf-infra-packer-validate:
1560           openstack: '{openstack}'
1561           openstack-cloud: '{openstack-cloud}'
1562           packer-cloud-settings: '{packer-cloud-settings}'
1563           packer-version: '{packer-version}'
1564
1565 - job-template:
1566     name: '{project-name}-packer-verify'
1567     id: gerrit-packer-verify
1568     <<: *lf_packer_common
1569     # yamllint disable-line rule:key-duplicates
1570     <<: *lf_packer_verify
1571
1572     ######################
1573     # Default parameters #
1574     ######################
1575
1576     git-url: '$GIT_URL/$GERRIT_PROJECT'
1577
1578     #####################
1579     # Job Configuration #
1580     #####################
1581
1582     scm:
1583       - lf-infra-gerrit-scm:
1584           git-url: '{git-url}'
1585           refspec: '$GERRIT_REFSPEC'
1586           branch: '$GERRIT_BRANCH'
1587           submodule-recursive: '{submodule-recursive}'
1588           submodule-timeout: '{submodule-timeout}'
1589           choosing-strategy: gerrit
1590           jenkins-ssh-credential: '{jenkins-ssh-credential}'
1591
1592     triggers:
1593       - gerrit:
1594           server-name: '{gerrit-server-name}'
1595           trigger-on: '{obj:gerrit_verify_triggers}'
1596           projects:
1597             - project-compare-type: ANT
1598               project-pattern: '{project}'
1599               branches:
1600                 - branch-compare-type: ANT
1601                   branch-pattern: '**/{branch}'
1602               file-paths: '{obj:gerrit_trigger_file_paths}'
1603
1604 - job-template:
1605     name: '{project-name}-packer-verify'
1606     id: github-packer-verify
1607     <<: *lf_packer_common
1608     # yamllint disable-line rule:key-duplicates
1609     <<: *lf_packer_verify
1610
1611     #####################
1612     # Job Configuration #
1613     #####################
1614
1615     properties:
1616       - lf-infra-properties:
1617           project: '{project}'
1618           build-days-to-keep: 7
1619       - github:
1620           url: '{github-url}/{github-org}/{project}'
1621
1622     scm:
1623       - lf-infra-github-scm:
1624           url: '{git-clone-url}{github-org}/{project}'
1625           refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
1626           branch: '$sha1'
1627           submodule-recursive: '{submodule-recursive}'
1628           submodule-timeout: '{submodule-timeout}'
1629           choosing-strategy: default
1630           jenkins-ssh-credential: '{jenkins-ssh-credential}'
1631
1632     triggers:
1633       - github-pull-request:
1634           trigger-phrase: '^(recheck|reverify)$'
1635           only-trigger-phrase: false
1636           status-context: 'Packer Verify'
1637           permit-all: true
1638           github-hooks: true
1639           included-regions: '{obj:github_included_regions}'
1640           white-list-target-branches:
1641             - '{branch}'