02d954044e47761dff91863b2eb076e791fab816
[releng/global-jjb.git] / jjb / lf-ci-jobs.yaml
1 ---
2 - job-group:
3     name: '{project-name}-ci-jobs'
4
5     jobs:
6       - gerrit-jenkins-cfg-merge
7       - gerrit-jjb-deploy-job
8       - gerrit-jjb-merge
9       - gerrit-jjb-verify
10
11 - job-group:
12     name: '{project-name}-github-ci-jobs'
13
14     jobs:
15       - github-jenkins-cfg-merge
16       - github-jjb-deploy-job
17       - github-jjb-merge
18       - github-jjb-verify
19
20 - job-group:
21     name: '{project-name}-packer-jobs'
22
23     packer-version: 1.2.2
24
25     jobs:
26       - gerrit-packer-merge
27       - gerrit-packer-verify
28
29
30 - job-group:
31     name: '{project-name}-github-packer-jobs'
32
33     packer-version: 1.2.2
34
35     jobs:
36       - github-packer-merge
37       - github-packer-verify
38
39 ####################
40 # COMMON FUNCTIONS #
41 ####################
42
43 - builder:
44     name: lf-infra-jjbini
45     builders:
46       - config-file-provider:
47           files:
48             - file-id: jjbini
49               target: '$HOME/.config/jenkins_jobs/jenkins_jobs.ini'
50
51 - builder:
52     name: lf-infra-jjbini-sandbox
53     # TODO: Consolidate this into jjbini when JJB2.0 is available.
54     builders:
55       - config-file-provider:
56           files:
57             - file-id: jjbini-sandbox
58               target: '$HOME/.config/jenkins_jobs/jenkins_jobs.ini'
59
60 - lf_packer_file_paths: &lf_packer_file_paths
61     name: lf-packer-file-paths
62     file-paths:
63       - compare-type: ANT
64         pattern: 'packer/vars/{platforms}.json'
65       - compare-type: ANT
66         pattern: 'packer/templates/{templates}.json'
67       - compare-type: ANT
68         pattern: 'packer/provision/*.sh'
69       - compare-type: ANT
70         pattern: 'packer/provision/{templates}.yaml'
71       - compare-type: ANT
72         pattern: 'packer/provision/local-{templates}.yaml'
73       - compare-type: ANT
74         pattern: 'packer/provision/lib/**'
75
76 - lf_packer: &lf_packer_common
77     name: lf-packer-common
78     # Provide configuration common in packer jobs.
79
80     ######################
81     # Default parameters #
82     ######################
83
84     branch: master
85     build-timeout: 90
86     stream: master
87     submodule-recursive: true
88     packer-cloud-settings: packer-cloud-env
89
90     #####################
91     # Job Configuration #
92     #####################
93
94     project-type: freestyle
95     node: '{build-node}'
96
97     properties:
98       - lf-infra-properties:
99           project: '{project}'
100           build-days-to-keep: 7
101
102     parameters:
103       - lf-infra-parameters:
104           project: '{project}'
105           stream: '{stream}'
106           branch: '{branch}'
107           lftools-version: '{lftools-version}'
108       - lf-infra-packer-parameters:
109           packer-version: '{packer-version}'
110
111     wrappers:
112       - lf-infra-wrappers:
113           build-timeout: '{build-timeout}'
114           jenkins-ssh-credential: '{jenkins-ssh-credential}'
115
116     publishers:
117       - lf-infra-publish
118
119 - parameter:
120     name: lf-infra-jjb-parameters
121     parameters:
122       - string:
123           name: JJB_VERSION
124           default: '{jjb-version}'
125           description: Jenkins Job Builder version to download and install.
126
127 - parameter:
128     name: lf-infra-packer-parameters
129     parameters:
130       - string:
131           name: PACKER_VERSION
132           default: '{packer-version}'
133           description: Packer version to download and install.
134
135 - lf_jjb_common: &lf_jjb_common
136     name: lf-jjb-common
137
138     ######################
139     # Default parameters #
140     ######################
141
142     branch: master
143     build-timeout: 10
144     jjb-version: 2.0.5
145     stream: master
146     submodule-recursive: true
147
148     gerrit_trigger_file_paths:
149       - compare-type: ANT
150         pattern: '**/*.sh'
151       - compare-type: ANT
152         pattern: '**/*.yaml'
153       - compare-type: ANT
154         pattern: '**/global-jjb'
155
156     #####################
157     # Job Configuration #
158     #####################
159
160     project-type: freestyle
161     node: '{build-node}'
162
163     properties:
164       - lf-infra-properties:
165           project: '{project}'
166           build-days-to-keep: 7
167
168     parameters:
169       - lf-infra-parameters:
170           project: '{project}'
171           stream: '{stream}'
172           branch: '{branch}'
173           lftools-version: '{lftools-version}'
174       - lf-infra-jjb-parameters:
175           jjb-version: '{jjb-version}'
176
177     wrappers:
178       - lf-infra-wrappers:
179           build-timeout: '{build-timeout}'
180           jenkins-ssh-credential: '{jenkins-ssh-credential}'
181
182     publishers:
183       - lf-infra-publish
184
185 ######################
186 # Gerrit Branch Lock #
187 ######################
188
189 - job-template:
190     name: '{project-name}-gerrit-branch-lock-{stream}'
191     id: gerrit-branch-lock
192
193     ######################
194     # Default parameters #
195     ######################
196
197     branch: master
198     git-url: '$GIT_URL/$GERRIT_PROJECT'
199     stream: master
200     gerrit_merge_triggers:
201       - comment-added-contains-event:
202           comment-contains-value: (un)?lock branch$
203
204     #####################
205     # Job Configuration #
206     #####################
207
208     project-type: freestyle
209     node: '{build-node}'
210
211     properties:
212       - lf-infra-properties:
213           project: '{project}'
214           build-days-to-keep: 1
215
216     parameters:
217       - lf-infra-parameters:
218           project: '{project}'
219           stream: '{stream}'
220           branch: '{branch}'
221           lftools-version: '{lftools-version}'
222
223     wrappers:
224       - lf-infra-wrappers:
225           build-timeout: 5
226           jenkins-ssh-credential: '{jenkins-ssh-credential}'
227
228     scm:
229       - lf-infra-gerrit-scm:
230           git-url: '{git-url}'
231           refspec: ''
232           branch: '{branch}'
233           submodule-recursive: false
234           choosing-strategy: default
235           jenkins-ssh-credential: '{jenkins-ssh-credential}'
236
237     triggers:
238       - gerrit:
239           server-name: '{gerrit-server-name}'
240           trigger-on: '{obj:gerrit_merge_triggers}'
241           projects:
242             - project-compare-type: ANT
243               project-pattern: '{project}'
244               branches:
245                 - branch-compare-type: ANT
246                   branch-pattern: '**/{branch}'
247
248     builders:
249       - shell: !include-raw-escape: ../shell/gerrit-branch-lock.sh
250
251
252     publishers:
253       - lf-infra-publish
254
255 ##########################################
256 # Jenkins Configuration Management Merge #
257 ##########################################
258
259 - builder:
260     name: lf-jenkins-cfg-clouds
261     builders:
262       - lf-infra-jjbini
263       - inject:
264           properties-content: 'jenkins_silos={jenkins-silos}'
265       - shell: !include-raw-escape: ../shell/jenkins-configure-clouds.sh
266       - shell: rm "$HOME/.config/jenkins_jobs/jenkins_jobs.ini"
267
268 - builder:
269     name: lf-jenkins-cfg-global-vars
270     builders:
271       - lf-infra-jjbini
272       - inject:
273           properties-content: 'jenkins_silos={jenkins-silos}'
274       - shell: !include-raw-escape: ../shell/jenkins-configure-global-vars.sh
275       - shell: rm "$HOME/.config/jenkins_jobs/jenkins_jobs.ini"
276
277 - lf_jenkins_configuration: &lf_jenkins_cfg_merge
278     name: lf-jenkins-cfg-merge
279
280     ######################
281     # Default parameters #
282     ######################
283
284     branch: master
285     cron: '@daily'
286     git-url: '$GIT_URL/$GERRIT_PROJECT'
287     jenkins-silos: production sandbox
288
289     gerrit_merge_triggers:
290       - change-merged-event
291       - comment-added-contains-event:
292           comment-contains-value: remerge$
293
294     gerrit_trigger_file_paths:
295       - compare-type: ANT
296         pattern: 'jenkins-config/**'
297
298     #####################
299     # Job Configuration #
300     #####################
301
302     project-type: freestyle
303     node: '{build-node}'
304     concurrent: false
305
306     properties:
307       - lf-infra-properties:
308           project: '{project}'
309           build-days-to-keep: 1
310
311     parameters:
312       - lf-infra-parameters:
313           project: '{project}'
314           stream: ''
315           branch: master
316           lftools-version: '{lftools-version}'
317
318     wrappers:
319       - lf-infra-wrappers:
320           build-timeout: 10
321           jenkins-ssh-credential: '{jenkins-ssh-credential}'
322
323     builders:
324       - shell: !include-raw-escape:
325           - ../shell/lftools-install.sh
326       - lf-jenkins-cfg-global-vars:
327           jenkins-silos: '{jenkins-silos}'
328       - lf-jenkins-cfg-clouds:
329           jenkins-silos: '{jenkins-silos}'
330
331     publishers:
332       - lf-infra-publish
333
334 - job-template:
335     name: '{project-name}-jenkins-cfg-merge'
336     id: gerrit-jenkins-cfg-merge
337     <<: *lf_jenkins_cfg_merge
338
339     scm:
340       - lf-infra-gerrit-scm:
341           git-url: '{git-url}'
342           refspec: 'refs/heads/{branch}'
343           branch: '{branch}'
344           submodule-recursive: true
345           choosing-strategy: default
346           jenkins-ssh-credential: '{jenkins-ssh-credential}'
347
348     triggers:
349       - timed: '{obj:cron}'
350       - gerrit:
351           server-name: '{gerrit-server-name}'
352           trigger-on: '{obj:gerrit_merge_triggers}'
353           projects:
354             - project-compare-type: ANT
355               project-pattern: '{project}'
356               branches:
357                 - branch-compare-type: ANT
358                   branch-pattern: '**/{branch}'
359               file-paths: '{obj:gerrit_trigger_file_paths}'
360
361 - job-template:
362     name: '{project-name}-jenkins-cfg-merge'
363     id: github-jenkins-cfg-merge
364     <<: *lf_jenkins_cfg_merge
365
366     properties:
367       - github:
368           url: '{git-url}/{github-org}/{project}'
369
370     scm:
371       - lf-infra-github-scm:
372           url: '{git-clone-url}{github-org}/{project}'
373           refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
374           branch: '$sha1'
375           submodule-recursive: true
376           choosing-strategy: default
377           jenkins-ssh-credential: '{jenkins-ssh-credential}'
378
379     triggers:
380       - timed: '{obj:cron}'
381       - github
382       - pollscm:
383           cron: ''
384       - lf-infra-github-pr-trigger:
385           trigger-phrase: '^remerge$'
386           only-trigger-phrase: true
387           status-context: 'Jenkins CFG Merge'
388           permit-all: false
389           github-hooks: true
390           github-org: '{github-org}'
391           github_pr_whitelist: '{obj:github_pr_whitelist}'
392           github_pr_admin_list: '{obj:github_pr_admin_list}'
393
394
395 ##################
396 # JJB DEPLOY JOB #
397 ##################
398
399 - lf_jjb_deploy_job: &lf_jjb_deploy_job
400     name: lf-jjb-deploy-job
401
402     ######################
403     # Default parameters #
404     ######################
405
406     branch: master
407     git-url: '$GIT_URL/$GERRIT_PROJECT'
408     stream: master
409     gerrit_jjb_deploy_job_triggers:
410       - comment-added-contains-event:
411           comment-contains-value: 'jjb-deploy[:]* (?!\*+$).+$'
412
413     #####################
414     # Job Configuration #
415     #####################
416
417     project-type: freestyle
418     node: '{build-node}'
419     concurrent: true
420
421     properties:
422       - lf-infra-properties:
423           project: '{project}'
424           build-days-to-keep: 1
425
426     parameters:
427       - lf-infra-parameters:
428           project: '{project}'
429           stream: '{stream}'
430           branch: '{branch}'
431           lftools-version: '{lftools-version}'
432
433     wrappers:
434       - lf-infra-wrappers:
435           build-timeout: 5
436           jenkins-ssh-credential: '{jenkins-ssh-credential}'
437
438     builders:
439       - lf-pip-install:
440           pip-packages: jenkins-job-builder
441       - lf-infra-jjbini-sandbox
442       - shell: !include-raw-escape: ../shell/jjb-deploy-job.sh
443
444     publishers:
445       - lf-infra-publish
446
447 - job-template:
448     name: '{project-name}-jjb-deploy-job'
449     id: gerrit-jjb-deploy-job
450     <<: *lf_jjb_deploy_job
451
452     scm:
453       - lf-infra-gerrit-scm:
454           git-url: '{git-url}'
455           refspec: 'refs/heads/{branch}'
456           branch: '{branch}'
457           submodule-recursive: true
458           choosing-strategy: default
459           jenkins-ssh-credential: '{jenkins-ssh-credential}'
460
461     triggers:
462       - gerrit:
463           server-name: '{gerrit-server-name}'
464           trigger-on: '{obj:gerrit_jjb_deploy_job_triggers}'
465           projects:
466             - project-compare-type: ANT
467               project-pattern: '{project}'
468               branches:
469                 - branch-compare-type: ANT
470                   branch-pattern: '**/{branch}'
471           skip-vote:
472             success: true
473             failed: true
474             unstable: true
475             notbuilt: true
476
477 - job-template:
478     name: '{project-name}-jjb-deploy-job'
479     id: github-jjb-deploy-job
480     <<: *lf_jjb_deploy_job
481
482     properties:
483       - github:
484           url: '{git-url}/{github-org}/{project}'
485
486     scm:
487       - lf-infra-github-scm:
488           url: '{git-clone-url}{github-org}/{project}'
489           refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
490           branch: '$sha1'
491           submodule-recursive: true
492           choosing-strategy: default
493           jenkins-ssh-credential: '{jenkins-ssh-credential}'
494
495     triggers:
496       - lf-infra-github-pr-trigger:
497           trigger-phrase: '^jjb-deploy (?!\*+$).+$'
498           only-trigger-phrase: true
499           status-context: 'JJB Deploy Job'
500           permit-all: true
501           github-hooks: true
502           github-org: ''
503           github_pr_whitelist:
504             - ''
505           github_pr_admin_list:
506             - ''
507
508 #############
509 # JJB Merge #
510 #############
511
512 - lf_jjb_merge: &lf_jjb_merge
513     name: lf-jjb-merge
514
515     ######################
516     # Default parameters #
517     ######################
518
519     gerrit_merge_triggers:
520       - change-merged-event
521       - comment-added-contains-event:
522           comment-contains-value: remerge$
523
524     #####################
525     # Job Configuration #
526     #####################
527
528     builders:
529       - lf-infra-jjbini
530       - shell: !include-raw-escape:
531           - ../shell/jjb-install.sh
532           - ../shell/jjb-merge-job.sh
533
534 - job-template:
535     name: '{project-name}-jjb-merge'
536     id: gerrit-jjb-merge
537     <<: *lf_jjb_common
538     # yamllint disable-line rule:key-duplicates
539     <<: *lf_jjb_merge
540
541     git-url: '$GIT_URL/$GERRIT_PROJECT'
542
543     scm:
544       - lf-infra-gerrit-scm:
545           git-url: '{git-url}'
546           refspec: ''
547           branch: '{branch}'
548           submodule-recursive: '{submodule-recursive}'
549           choosing-strategy: default
550           jenkins-ssh-credential: '{jenkins-ssh-credential}'
551
552     triggers:
553       - gerrit:
554           server-name: '{gerrit-server-name}'
555           trigger-on: '{obj:gerrit_merge_triggers}'
556           projects:
557             - project-compare-type: ANT
558               project-pattern: '{project}'
559               branches:
560                 - branch-compare-type: ANT
561                   branch-pattern: '**/{branch}'
562               file-paths: '{obj:gerrit_trigger_file_paths}'
563
564 - job-template:
565     name: '{project-name}-jjb-merge'
566     id: github-jjb-merge
567     <<: *lf_jjb_common
568     # yamllint disable-line rule:key-duplicates
569     <<: *lf_jjb_merge
570
571     properties:
572       - github:
573           url: '{git-url}/{github-org}/{project}'
574
575     scm:
576       - lf-infra-github-scm:
577           url: '{git-clone-url}{github-org}/{project}'
578           refspec: ''
579           branch: 'refs/heads/{branch}'
580           submodule-recursive: '{submodule-recursive}'
581           choosing-strategy: default
582           jenkins-ssh-credential: '{jenkins-ssh-credential}'
583
584     triggers:
585       - github
586       - pollscm:
587           cron: ''
588       - lf-infra-github-pr-trigger:
589           trigger-phrase: '^remerge$'
590           only-trigger-phrase: true
591           status-context: 'JJB Merge'
592           permit-all: false
593           github-hooks: true
594           github-org: '{github-org}'
595           github_pr_whitelist: '{obj:github_pr_whitelist}'
596           github_pr_admin_list: '{obj:github_pr_admin_list}'
597
598 ##############
599 # JJB Verify #
600 ##############
601
602 - lf_jjb_verify: &lf_jjb_verify
603     name: lf-jjb-verify
604
605     ######################
606     # Default parameters #
607     ######################
608
609     gerrit_verify_triggers:
610       - patchset-created-event:
611           exclude-drafts: true
612           exclude-trivial-rebase: false
613           exclude-no-code-change: false
614       - draft-published-event
615       - comment-added-contains-event:
616           comment-contains-value: recheck$
617
618     #####################
619     # Job Configuration #
620     #####################
621
622     concurrent: true
623
624     builders:
625       - lf-infra-jjbini
626       - shell: !include-raw-escape:
627           - ../shell/git-validate-jira-urls.sh
628           - ../shell/jjb-install.sh
629           - ../shell/jjb-verify-job.sh
630           - ../shell/jjb-check-unicode.sh
631       - lf-infra-gpg-verify-git-signature
632
633 - job-template:
634     name: '{project-name}-jjb-verify'
635     id: gerrit-jjb-verify
636     <<: *lf_jjb_common
637     # yamllint disable-line rule:key-duplicates
638     <<: *lf_jjb_verify
639
640     git-url: '$GIT_URL/$GERRIT_PROJECT'
641
642     scm:
643       - lf-infra-gerrit-scm:
644           git-url: '{git-url}'
645           refspec: '$GERRIT_REFSPEC'
646           branch: '$GERRIT_BRANCH'
647           submodule-recursive: '{submodule-recursive}'
648           choosing-strategy: gerrit
649           jenkins-ssh-credential: '{jenkins-ssh-credential}'
650
651     triggers:
652       - gerrit:
653           server-name: '{gerrit-server-name}'
654           trigger-on: '{obj:gerrit_verify_triggers}'
655           projects:
656             - project-compare-type: ANT
657               project-pattern: '{project}'
658               branches:
659                 - branch-compare-type: ANT
660                   branch-pattern: '**/{branch}'
661               file-paths: '{obj:gerrit_trigger_file_paths}'
662
663 - job-template:
664     name: '{project-name}-jjb-verify'
665     id: github-jjb-verify
666     <<: *lf_jjb_common
667     # yamllint disable-line rule:key-duplicates
668     <<: *lf_jjb_verify
669
670     properties:
671       - github:
672           url: '{git-url}/{github-org}/{project}'
673
674     scm:
675       - lf-infra-github-scm:
676           url: '{git-clone-url}{github-org}/{project}'
677           refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
678           branch: '$sha1'
679           submodule-recursive: '{submodule-recursive}'
680           choosing-strategy: default
681           jenkins-ssh-credential: '{jenkins-ssh-credential}'
682
683     triggers:
684       - lf-infra-github-pr-trigger:
685           trigger-phrase: '^recheck$'
686           only-trigger-phrase: false
687           status-context: 'JJB Verify'
688           permit-all: true
689           github-hooks: true
690           github-org: ''
691           github_pr_whitelist:
692             - ''
693           github_pr_admin_list:
694             - ''
695
696 ################
697 # Packer Merge #
698 ################
699
700 - lf_packer_merge: &lf_packer_merge
701     name: lf-packer-merge
702
703     ######################
704     # Default parameters #
705     ######################
706
707     gerrit_merge_triggers:
708       - change-merged-event
709       - comment-added-contains-event:
710           comment-contains-value: remerge$
711
712     #####################
713     # Job Configuration #
714     #####################
715
716     builders:
717       - lf-infra-packer-validate:
718           packer-cloud-settings: '{packer-cloud-settings}'
719           packer-version: '{packer-version}'
720       - lf-infra-packer-build:
721           packer-cloud-settings: '{packer-cloud-settings}'
722           packer-version: '{packer-version}'
723           platform: '{platforms}'
724           template: '{templates}'
725
726 - job-template:
727     name: '{project-name}-packer-merge-{platforms}-{templates}'
728     id: gerrit-packer-merge
729     <<: *lf_packer_common
730     # yamllint disable-line rule:key-duplicates
731     <<: *lf_packer_merge
732
733     git-url: '$GIT_URL/$GERRIT_PROJECT'
734
735     scm:
736       - lf-infra-gerrit-scm:
737           git-url: '{git-url}'
738           refspec: '$GERRIT_REFSPEC'
739           branch: '$GERRIT_BRANCH'
740           submodule-recursive: '{submodule-recursive}'
741           choosing-strategy: gerrit
742           jenkins-ssh-credential: '{jenkins-ssh-credential}'
743
744     triggers:
745       - timed: '00 10 1 * *'
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               <<: *lf_packer_file_paths
756
757 - job-template:
758     name: '{project-name}-packer-merge-{platforms}-{templates}'
759     id: github-packer-merge
760     <<: *lf_packer_common
761     # yamllint disable-line rule:key-duplicates
762     <<: *lf_packer_merge
763
764     properties:
765       - github:
766           url: '{git-url}/{github-org}/{project}'
767
768     scm:
769       - lf-infra-github-scm:
770           url: '{git-clone-url}{github-org}/{project}'
771           refspec: ''
772           branch: 'refs/heads/{branch}'
773           submodule-recursive: '{submodule-recursive}'
774           choosing-strategy: default
775           jenkins-ssh-credential: '{jenkins-ssh-credential}'
776
777     triggers:
778       - timed: '00 10 1 * *'
779       - github
780       - pollscm:
781           cron: ''
782       - lf-infra-github-pr-trigger:
783           trigger-phrase: '^remerge$'
784           only-trigger-phrase: true
785           status-context: 'Packer {platforms}-${templates} Merge'
786           permit-all: false
787           github-hooks: true
788           github-org: '{github-org}'
789           github_pr_whitelist: '{obj:github_pr_whitelist}'
790           github_pr_admin_list: '{obj:github_pr_admin_list}'
791
792 #################
793 # Packer Verify #
794 #################
795
796 - lf_packer_verify: &lf_packer_verify
797     name: lf-packer-verify
798
799     ######################
800     # Default parameters #
801     ######################
802
803     build-timeout: 10
804
805     gerrit_verify_triggers:
806       - patchset-created-event:
807           exclude-drafts: true
808           exclude-trivial-rebase: false
809           exclude-no-code-change: false
810       - draft-published-event
811       - comment-added-contains-event:
812           comment-contains-value: recheck$
813
814     gerrit_trigger_file_paths:
815       - compare-type: ANT
816         pattern: 'packer/vars/**.json'
817       - compare-type: ANT
818         pattern: 'packer/templates/**.json'
819       - compare-type: ANT
820         pattern: 'packer/provision/**.sh'
821       - compare-type: ANT
822         pattern: 'packer/provision/lib/**'
823
824     #####################
825     # Job Configuration #
826     #####################
827
828     concurrent: true
829
830     builders:
831       - lf-infra-packer-validate:
832           packer-cloud-settings: '{packer-cloud-settings}'
833           packer-version: '{packer-version}'
834
835 - job-template:
836     name: '{project-name}-packer-verify'
837     id: gerrit-packer-verify
838     <<: *lf_packer_common
839     # yamllint disable-line rule:key-duplicates
840     <<: *lf_packer_verify
841
842     git-url: '$GIT_URL/$GERRIT_PROJECT'
843
844     scm:
845       - lf-infra-gerrit-scm:
846           git-url: '{git-url}'
847           refspec: '$GERRIT_REFSPEC'
848           branch: '$GERRIT_BRANCH'
849           submodule-recursive: '{submodule-recursive}'
850           choosing-strategy: gerrit
851           jenkins-ssh-credential: '{jenkins-ssh-credential}'
852
853     triggers:
854       - gerrit:
855           server-name: '{gerrit-server-name}'
856           trigger-on: '{obj:gerrit_verify_triggers}'
857           projects:
858             - project-compare-type: ANT
859               project-pattern: '{project}'
860               branches:
861                 - branch-compare-type: ANT
862                   branch-pattern: '**/{branch}'
863               file-paths: '{obj:gerrit_trigger_file_paths}'
864
865 - job-template:
866     name: '{project-name}-packer-verify'
867     id: github-packer-verify
868     <<: *lf_packer_common
869     # yamllint disable-line rule:key-duplicates
870     <<: *lf_packer_verify
871
872     properties:
873       - github:
874           url: '{git-url}/{github-org}/{project}'
875
876     scm:
877       - lf-infra-github-scm:
878           url: '{git-clone-url}{github-org}/{project}'
879           refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
880           branch: '$sha1'
881           submodule-recursive: '{submodule-recursive}'
882           choosing-strategy: default
883           jenkins-ssh-credential: '{jenkins-ssh-credential}'
884
885     triggers:
886       - lf-infra-github-pr-trigger:
887           trigger-phrase: '^recheck$'
888           only-trigger-phrase: false
889           status-context: 'Packer Verify'
890           permit-all: true
891           github-hooks: true
892           github-org: ''
893           github_pr_whitelist:
894             - ''
895           github_pr_admin_list:
896             - ''