Do not trigger on drafts before Publish
[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.0.2
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.0.2
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     #     :gerrit_trigger_file_paths: Override file paths which can be used to
673     #         filter which file modifications will trigger a build.
674     #         (default defined by lf_jjb_common)
675
676     ######################
677     # Default parameters #
678     ######################
679
680     gerrit_merge_triggers:
681       - change-merged-event
682       - comment-added-contains-event:
683           comment-contains-value: remerge$
684
685     #####################
686     # Job Configuration #
687     #####################
688
689     builders:
690       - lf-infra-packer-validate:
691           packer-cloud-settings: '{packer-cloud-settings}'
692           packer-version: '{packer-version}'
693       - lf-infra-packer-build:
694           packer-cloud-settings: '{packer-cloud-settings}'
695           packer-version: '{packer-version}'
696           platform: '{platforms}'
697           template: '{templates}'
698
699 - job-template:
700     name: '{project-name}-packer-merge-{platforms}-{templates}'
701     id: gerrit-packer-merge
702     <<: *lf_packer_common
703     # yamllint disable-line rule:key-duplicates
704     <<: *lf_packer_merge
705
706     git-url: '$GIT_URL/$GERRIT_PROJECT'
707
708     scm:
709       - lf-infra-gerrit-scm:
710           git-url: '{git-url}'
711           refspec: '$GERRIT_REFSPEC'
712           branch: '$GERRIT_BRANCH'
713           submodule-recursive: '{submodule-recursive}'
714           choosing-strategy: gerrit
715           jenkins-ssh-credential: '{jenkins-ssh-credential}'
716
717     triggers:
718       - timed: '00 10 1 * *'
719       - gerrit:
720           server-name: '{gerrit-server-name}'
721           trigger-on: '{obj:gerrit_merge_triggers}'
722           projects:
723             - project-compare-type: ANT
724               project-pattern: '{project}'
725               branches:
726                 - branch-compare-type: ANT
727                   branch-pattern: '**/{branch}'
728               <<: *lf_packer_file_paths
729
730 - job-template:
731     name: '{project-name}-packer-merge-{platforms}-{templates}'
732     id: github-packer-merge
733     <<: *lf_packer_common
734     # yamllint disable-line rule:key-duplicates
735     <<: *lf_packer_merge
736
737     properties:
738       - github:
739           url: '{git-url}/{github-org}/{project}'
740
741     scm:
742       - lf-infra-github-scm:
743           url: '{git-clone-url}{github-org}/{project}'
744           refspec: ''
745           branch: '{branch}'
746           submodule-recursive: '{submodule-recursive}'
747           choosing-strategy: default
748           jenkins-ssh-credential: '{jenkins-ssh-credential}'
749
750     triggers:
751       - timed: '00 10 1 * *'
752       - github
753       - pollscm:
754           cron: ''
755       - lf-infra-github-pr-trigger:
756           trigger-phrase: '^remerge$'
757           only-trigger-phrase: true
758           status-context: 'Packer {platforms}-${templates} Merge'
759           permit-all: false
760           github-hooks: true
761           github-org: '{github-org}'
762           github_pr_whitelist: '{obj:github_pr_whitelist}'
763           github_pr_admin_list: '{obj:github_pr_admin_list}'
764
765 #################
766 # Packer Verify #
767 #################
768
769 - lf_packer_verify: &lf_packer_verify
770     name: lf-packer-verify
771
772     # Packer Verify job runs `packer validate` to verify packer configuration.
773     #
774     # Required parameters:
775     #
776     #     :build-node: The node to run build on.
777     #     :jenkins-ssh-credential: Credential to use for SSH. (Generally should
778     #         be configured in defaults.yaml)
779     #     :mvn-settings: The name of settings file containing credentials for
780     #         the project.
781     #
782     # Optional parameters:
783     #
784     #     :branch: Git branch to fetch for the build. (default: master)
785     #     :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
786     #     :build-timeout: Timeout in seconds before aborting build. (default: 10)
787     #     :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
788     #     :packer-cloud-settings: Name of settings file containing credentials
789     #         for the cloud that packer will build on. (default: packer-cloud-env)
790     #     :packer-version: Version of packer to install / use in build. (default: 1.0.2)
791     #     :stream: Keyword that can be used to represent a release code-name.
792     #         Often the same as the branch. (default: master)
793     #     :submodule-recursive: Whether to checkout submodules recursively.
794     #         (default: true)
795     #
796     #     :gerrit_verify_triggers: Override Gerrit Triggers.
797     #     :gerrit_trigger_file_paths: Override file paths which can be used to
798     #         filter which file modifications will trigger a build.
799     #         (default defined by lf_jjb_common)
800
801     ######################
802     # Default parameters #
803     ######################
804
805     build-timeout: 10
806
807     gerrit_verify_triggers:
808       - patchset-created-event:
809           exclude-drafts: true
810           exclude-trivial-rebase: false
811           exclude-no-code-change: false
812       - draft-published-event
813       - comment-added-contains-event:
814           comment-contains-value: recheck$
815
816     #####################
817     # Job Configuration #
818     #####################
819
820     concurrent: true
821
822     builders:
823       - lf-infra-packer-validate:
824           packer-cloud-settings: '{packer-cloud-settings}'
825           packer-version: '{packer-version}'
826
827 - job-template:
828     name: '{project-name}-packer-verify'
829     id: gerrit-packer-verify
830     <<: *lf_packer_common
831     # yamllint disable-line rule:key-duplicates
832     <<: *lf_packer_verify
833
834     git-url: '$GIT_URL/$GERRIT_PROJECT'
835
836     scm:
837       - lf-infra-gerrit-scm:
838           git-url: '{git-url}'
839           refspec: '$GERRIT_REFSPEC'
840           branch: '$GERRIT_BRANCH'
841           submodule-recursive: '{submodule-recursive}'
842           choosing-strategy: gerrit
843           jenkins-ssh-credential: '{jenkins-ssh-credential}'
844
845     triggers:
846       - gerrit:
847           server-name: '{gerrit-server-name}'
848           trigger-on: '{obj:gerrit_verify_triggers}'
849           projects:
850             - project-compare-type: ANT
851               project-pattern: '{project}'
852               branches:
853                 - branch-compare-type: ANT
854                   branch-pattern: '**/{branch}'
855               <<: *lf_packer_file_paths
856
857 - job-template:
858     name: '{project-name}-packer-verify'
859     id: github-packer-verify
860     <<: *lf_packer_common
861     # yamllint disable-line rule:key-duplicates
862     <<: *lf_packer_verify
863
864     properties:
865       - github:
866           url: '{git-url}/{github-org}/{project}'
867
868     scm:
869       - lf-infra-github-scm:
870           url: '{git-clone-url}{github-org}/{project}'
871           refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
872           branch: '{branch}'
873           submodule-recursive: '{submodule-recursive}'
874           choosing-strategy: default
875           jenkins-ssh-credential: '{jenkins-ssh-credential}'
876
877     triggers:
878       - lf-infra-github-pr-trigger:
879           trigger-phrase: '^recheck$'
880           only-trigger-phrase: false
881           status-context: 'Packer Verify'
882           permit-all: true
883           github-hooks: true
884           github-org: ''
885           github_pr_whitelist:
886             - ''
887           github_pr_admin_list:
888             - ''