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