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