Ensure that no lingering .netrc is overriding cfg
[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     build-concurrent: true
809
810     gerrit_verify_triggers:
811       - patchset-created-event:
812           exclude-drafts: true
813           exclude-trivial-rebase: false
814           exclude-no-code-change: false
815       - draft-published-event
816       - comment-added-contains-event:
817           comment-contains-value: '^Patch Set[ ]+[0-9]+:([ ]+|[\n]+)(recheck|reverify)$'
818
819     #####################
820     # Job Configuration #
821     #####################
822
823     concurrent: '{build-concurrent}'
824
825     builders:
826       - lf-infra-pre-build
827       - lf-infra-jjbini
828       - shell: !include-raw-escape:
829           - ../shell/git-validate-jira-urls.sh
830           - ../shell/jjb-install.sh
831           - ../shell/jjb-verify-job.sh
832           - ../shell/jjb-check-unicode.sh
833           - ../shell/jjb-cleanup.sh
834       - lf-infra-gpg-verify-git-signature
835
836 - job-template:
837     name: '{project-name}-jjb-verify'
838     id: gerrit-jjb-verify
839     <<: *lf_jjb_common
840     # yamllint disable-line rule:key-duplicates
841     <<: *lf_jjb_verify
842
843     ######################
844     # Default parameters #
845     ######################
846
847     git-url: '$GIT_URL/$GERRIT_PROJECT'
848
849     #####################
850     # Job Configuration #
851     #####################
852
853     scm:
854       - lf-infra-gerrit-scm:
855           git-url: '{git-url}'
856           refspec: '$GERRIT_REFSPEC'
857           branch: '$GERRIT_BRANCH'
858           submodule-recursive: '{submodule-recursive}'
859           submodule-timeout: '{submodule-timeout}'
860           choosing-strategy: gerrit
861           jenkins-ssh-credential: '{jenkins-ssh-credential}'
862
863     triggers:
864       - gerrit:
865           server-name: '{gerrit-server-name}'
866           trigger-on: '{obj:gerrit_verify_triggers}'
867           projects:
868             - project-compare-type: ANT
869               project-pattern: '{project}'
870               branches:
871                 - branch-compare-type: ANT
872                   branch-pattern: '**/{branch}'
873               file-paths: '{obj:gerrit_trigger_file_paths}'
874
875 - job-template:
876     name: '{project-name}-jjb-verify'
877     id: github-jjb-verify
878     <<: *lf_jjb_common
879     # yamllint disable-line rule:key-duplicates
880     <<: *lf_jjb_verify
881
882     #####################
883     # Job Configuration #
884     #####################
885
886     properties:
887       - lf-infra-properties:
888           project: '{project}'
889           build-days-to-keep: 7
890       - github:
891           url: '{github-url}/{github-org}/{project}'
892
893     scm:
894       - lf-infra-github-scm:
895           url: '{git-clone-url}{github-org}/{project}'
896           refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
897           branch: '$sha1'
898           submodule-recursive: '{submodule-recursive}'
899           submodule-timeout: '{submodule-timeout}'
900           choosing-strategy: default
901           jenkins-ssh-credential: '{jenkins-ssh-credential}'
902
903     triggers:
904       - github-pull-request:
905           trigger-phrase: '^(recheck|reverify)$'
906           only-trigger-phrase: false
907           status-context: 'JJB Verify'
908           permit-all: true
909           github-hooks: true
910           included-regions: '{obj:github_included_regions}'
911           white-list-target-branches:
912             - '{branch}'
913
914 ############################
915 # JJB Verify Upstream GJJB #
916 ############################
917
918 - lf_jjb_verify: &lf_jjb_verify_upstream_gjjb
919     name: lf-jjb-verify-upstream-gjjb
920
921     #####################
922     # Job Configuration #
923     #####################
924
925     concurrent: true
926
927     builders:
928       - shell: |
929           cd global-jjb
930           git fetch https://gerrit.linuxfoundation.org/infra/releng/global-jjb $GERRIT_REFSPEC
931           git cherry-pick FETCH_HEAD
932       - lf-infra-jjbini
933       - shell: !include-raw-escape:
934           - ../shell/git-validate-jira-urls.sh
935           - ../shell/jjb-install.sh
936           - ../shell/jjb-verify-job.sh
937           - ../shell/jjb-check-unicode.sh
938           - ../shell/jjb-cleanup.sh
939       - lf-infra-gpg-verify-git-signature
940
941 - job-template:
942     name: '{project-name}-jjb-verify-upstream-gjjb'
943     id: gerrit-jjb-verify-upstream-gjjb
944     <<: *lf_jjb_common
945     # yamllint disable-line rule:key-duplicates
946     <<: *lf_jjb_verify_upstream_gjjb
947
948     ######################
949     # Default parameters #
950     ######################
951
952     git-url: '$GIT_URL/$PROJECT'
953     submodule-timeout: 10
954
955     #####################
956     # Job Configuration #
957     #####################
958
959     scm:
960       - lf-infra-gerrit-scm:
961           git-url: '{git-url}'
962           refspec: ''
963           branch: 'master'
964           submodule-recursive: true
965           submodule-timeout: '{submodule-timeout}'
966           choosing-strategy: default
967           jenkins-ssh-credential: '{jenkins-ssh-credential}'
968
969     triggers:
970       - gerrit:
971           server-name: 'LinuxFoundation'
972           trigger-on:
973             - patchset-created-event:
974                 exclude-drafts: true
975                 exclude-trivial-rebase: false
976                 exclude-no-code-change: false
977             - draft-published-event
978             - comment-added-contains-event:
979                 comment-contains-value: '^Patch Set[ ]+[0-9]+:([ ]+|[\n]+)(recheck|reverify)$'
980           projects:
981             - project-compare-type: ANT
982               project-pattern: 'releng/global-jjb'
983               branches:
984                 - branch-compare-type: ANT
985                   branch-pattern: '**/master'
986           override-votes: true
987           gerrit-build-failed-codereview-value: -1
988           gerrit-build-failed-verified-value: 0
989           gerrit-build-successful-codereview-value: 1
990           gerrit-build-successful-verified-value: 0
991
992 #################
993 # License Check #
994 #################
995
996 - lf_license_check: &lf_license_check
997     name: lf-license-check
998
999     ######################
1000     # Default parameters #
1001     ######################
1002
1003     branch: master
1004     build-days-to-keep: 7
1005     build-timeout: 15
1006     disable-job: false
1007     file-patterns: >
1008         *.go
1009         *.groovy
1010         *.java
1011         *.py
1012         *.sh
1013     git-url: '$GIT_URL/$PROJECT'
1014     github-url: 'https://github.com'
1015     lhc-version: 0.2.0
1016     license-exclude-paths: ''
1017     licenses-allowed: Apache-2.0,EPL-1.0,MIT
1018     project-pattern: '**'
1019     spdx-disable: false
1020     stream: master
1021     submodule-timeout: 10
1022
1023     #####################
1024     # Job Configuration #
1025     #####################
1026
1027     project-type: freestyle
1028     node: '{build-node}'
1029     concurrent: true
1030     disabled: '{disable-job}'
1031
1032     properties:
1033       - lf-infra-properties:
1034           build-days-to-keep: '{build-days-to-keep}'
1035
1036     parameters:
1037       - lf-infra-parameters:
1038           project: '{project}'
1039           branch: '{branch}'
1040           stream: '{stream}'
1041
1042     wrappers:
1043       - lf-infra-wrappers:
1044           build-timeout: '{build-timeout}'
1045           jenkins-ssh-credential: '{jenkins-ssh-credential}'
1046
1047     builders:
1048       - lf-license-check:
1049           file-patterns: '{file-patterns}'
1050           spdx-disable: '{spdx-disable}'
1051           lhc-version: '{lhc-version}'
1052           license-exclude-paths: '{license-exclude-paths}'
1053           licenses-allowed: '{licenses-allowed}'
1054
1055     publishers:
1056       - lf-infra-publish
1057
1058 - job-template:
1059     name: '{project-name}-license-check'
1060     id: gerrit-license-check
1061     <<: *lf_license_check
1062
1063     git-url: '$GIT_URL/$GERRIT_PROJECT'
1064
1065     scm:
1066       - lf-infra-gerrit-scm:
1067           git-url: '{git-url}'
1068           refspec: '$GERRIT_REFSPEC'
1069           branch: '$GERRIT_BRANCH'
1070           # Submodules are out of the project's control
1071           submodule-recursive: false
1072           submodule-timeout: '{submodule-timeout}'
1073           choosing-strategy: gerrit
1074           jenkins-ssh-credential: '{jenkins-ssh-credential}'
1075
1076     triggers:
1077       - gerrit:
1078           server-name: '{gerrit-server-name}'
1079           # Trigger should not be overridable as we want to always run
1080           trigger-on:
1081             - patchset-created-event:
1082                 exclude-drafts: false
1083                 exclude-trivial-rebase: false
1084                 exclude-no-code-change: false
1085             - draft-published-event
1086             - comment-added-contains-event:
1087                 comment-contains-value: recheck$
1088           projects:
1089             - project-compare-type: ANT
1090               project-pattern: '{project-pattern}'
1091               branches:
1092                 - branch-compare-type: ANT
1093                   branch-pattern: '**'
1094
1095 - job-template:
1096     name: '{project-name}-license-check'
1097     id: github-license-check
1098     <<: *lf_license_check
1099
1100     properties:
1101       - lf-infra-properties:
1102           build-days-to-keep: '{build-days-to-keep}'
1103       - github:
1104           url: '{github-url}/{github-org}/{project}'
1105
1106     scm:
1107       - lf-infra-github-scm:
1108           url: '{git-clone-url}{github-org}/{project}'
1109           refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
1110           branch: '$sha1'
1111           # Submodules are out of the project's control
1112           submodule-recursive: false
1113           submodule-timeout: '{submodule-timeout}'
1114           choosing-strategy: default
1115           jenkins-ssh-credential: '{jenkins-ssh-credential}'
1116
1117     triggers:
1118       - github-pull-request:
1119           trigger-phrase: '^recheck$'
1120           only-trigger-phrase: false
1121           status-context: 'License Check'
1122           permit-all: true
1123           github-hooks: true
1124           white-list-target-branches:
1125             - '{branch}'
1126
1127 ####################
1128 # Info YAML Verify #
1129 ####################
1130
1131 - lf_info_yaml_verify: &lf_info_yaml_verify
1132     name: lf-info-yaml-verify
1133
1134     ######################
1135     # Default parameters #
1136     ######################
1137
1138     gerrit_verify_triggers:
1139       - patchset-created-event:
1140           exclude-drafts: true
1141           exclude-trivial-rebase: false
1142           exclude-no-code-change: false
1143       - draft-published-event
1144       - comment-added-contains-event:
1145           comment-contains-value: '^Patch Set[ ]+[0-9]+:([ ]+|[\n]+)(recheck|reverify)$'
1146
1147     #####################
1148     # Job Configuration #
1149     #####################
1150
1151     concurrent: true
1152
1153     builders:
1154       - shell: !include-raw-escape:
1155           - ../shell/git-validate-info-yaml.sh
1156           - ../shell/info-file-validate.sh
1157
1158 - job-template:
1159     name: '{project-name}-info-yaml-verify'
1160     id: gerrit-info-yaml-verify
1161     <<: *lf_jjb_common
1162     # yamllint disable-line rule:key-duplicates
1163     <<: *lf_info_yaml_verify
1164
1165     git-url: '$GIT_URL/$GERRIT_PROJECT'
1166
1167     scm:
1168       - lf-infra-gerrit-scm:
1169           git-url: '{git-url}'
1170           refspec: '$GERRIT_REFSPEC'
1171           branch: '$GERRIT_BRANCH'
1172           submodule-recursive: '{submodule-recursive}'
1173           submodule-timeout: '{submodule-timeout}'
1174           choosing-strategy: gerrit
1175           jenkins-ssh-credential: '{jenkins-ssh-credential}'
1176
1177     triggers:
1178       - gerrit:
1179           server-name: '{gerrit-server-name}'
1180           trigger-on: '{obj:gerrit_verify_triggers}'
1181           projects:
1182             - project-compare-type: ANT
1183               project-pattern: '{project}'
1184               branches:
1185                 - branch-compare-type: ANT
1186                   branch-pattern: '**/{branch}'
1187               file-paths:
1188                 - compare-type: REG_EXP
1189                   pattern: 'INFO.yaml'
1190
1191 - job-template:
1192     name: '{project-name}-info-yaml-verify'
1193     id: github-info-yaml-verify
1194     <<: *lf_jjb_common
1195     # yamllint disable-line rule:key-duplicates
1196     <<: *lf_info_yaml_verify
1197
1198     github-url: 'https://github.com'
1199     properties:
1200       - github:
1201           url: '{github-url}/{github-org}/{project}'
1202
1203     scm:
1204       - lf-infra-github-scm:
1205           url: '{git-clone-url}{github-org}/{project}'
1206           refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
1207           branch: '$sha1'
1208           submodule-recursive: '{submodule-recursive}'
1209           submodule-timeout: '{submodule-timeout}'
1210           choosing-strategy: default
1211           jenkins-ssh-credential: '{jenkins-ssh-credential}'
1212
1213     triggers:
1214       - github-pull-request:
1215           trigger-phrase: '^(recheck|reverify)$'
1216           only-trigger-phrase: false
1217           status-context: 'INFO File Verify'
1218           permit-all: true
1219           github-hooks: true
1220           # included-regions MUST match gerrit file-paths
1221           included-regions: 'INFO.yaml'
1222           white-list-target-branches:
1223             - '{branch}'
1224
1225 ##################
1226 # OPENSTACK CRON #
1227 ##################
1228
1229 - lf_openstack_cron: &lf_openstack_cron
1230     name: lf-openstack-cron
1231
1232     ######################
1233     # Default parameters #
1234     ######################
1235
1236     branch: master
1237     build-days-to-keep: 7
1238     build-timeout: 10
1239     cron: '@hourly'
1240     disable-job: false
1241     git-url: '$GIT_URL/$PROJECT'
1242     github-url: 'https://github.com'
1243     openstack-cloud: vex
1244     openstack-image-cleanup: true
1245     openstack-image-cleanup-age: 30
1246     openstack-image-protect: true
1247     openstack-server-cleanup: true
1248     openstack-stack-cleanup: true
1249     openstack-volume-cleanup: true
1250     stream: master
1251     submodule-timeout: 10
1252
1253     #####################
1254     # Job Configuration #
1255     #####################
1256
1257     project-type: freestyle
1258     node: '{build-node}'
1259     concurrent: false
1260     disabled: '{disable-job}'
1261
1262     properties:
1263       - lf-infra-properties:
1264           build-days-to-keep: '{build-days-to-keep}'
1265
1266     parameters:
1267       - lf-infra-parameters:
1268           project: '{project}'
1269           stream: '{stream}'
1270           branch: '{branch}'
1271       - string:
1272           name: JENKINS_URLS
1273           default: '{jenkins-urls}'
1274           description: |
1275               Space separated list of Jenkins URLs to check for active builds.
1276
1277     wrappers:
1278       - lf-infra-wrappers:
1279           build-timeout: '{build-timeout}'
1280           jenkins-ssh-credential: '{jenkins-ssh-credential}'
1281       # Listed after to override openstack-infra-wrappers clouds.yaml definition
1282       - config-file-provider:
1283           files:
1284             - file-id: clouds-yaml
1285               target: '$HOME/.config/openstack/clouds.yaml'
1286             - file-id: npmrc
1287               target: '$HOME/.npmrc'
1288             - file-id: pipconf
1289               target: '$HOME/.config/pip/pip.conf'
1290
1291     triggers:
1292       - timed: '{obj:cron}'
1293
1294     builders:
1295       - lf-infra-pre-build
1296       - inject:
1297           properties-content: OS_CLOUD={openstack-cloud}
1298       # Stacks
1299       - conditional-step:
1300           condition-kind: boolean-expression
1301           condition-expression: '{openstack-stack-cleanup}'
1302           steps:
1303             - shell: !include-raw-escape: ../shell/openstack-cleanup-orphaned-stacks.sh
1304       # Servers
1305       - conditional-step:
1306           condition-kind: boolean-expression
1307           condition-expression: '{openstack-server-cleanup}'
1308           steps:
1309             - shell: !include-raw-escape: ../shell/openstack-cleanup-orphaned-servers.sh
1310       # Volumes
1311       - conditional-step:
1312           condition-kind: boolean-expression
1313           condition-expression: '{openstack-volume-cleanup}'
1314           steps:
1315             - shell: !include-raw-escape: ../shell/openstack-cleanup-orphaned-volumes.sh
1316       # Images
1317       - conditional-step:
1318           condition-kind: boolean-expression
1319           condition-expression: '{openstack-image-protect}'
1320           steps:
1321             - shell: !include-raw-escape: ../shell/openstack-protect-in-use-images.sh
1322       - conditional-step:
1323           condition-kind: boolean-expression
1324           condition-expression: '{openstack-image-cleanup}'
1325           steps:
1326             - inject:
1327                 properties-content: OS_IMAGE_CLEANUP_AGE={openstack-image-cleanup-age}
1328             - shell: !include-raw-escape: ../shell/openstack-cleanup-old-images.sh
1329
1330     publishers:
1331       - lf-infra-publish
1332
1333 - job-template:
1334     name: '{project-name}-openstack-cron'
1335     id: gerrit-openstack-cron
1336     <<: *lf_openstack_cron
1337
1338     scm:
1339       - lf-infra-gerrit-scm:
1340           git-url: '{git-url}'
1341           refspec: 'refs/heads/{branch}'
1342           branch: '{branch}'
1343           submodule-recursive: true
1344           submodule-timeout: '{submodule-timeout}'
1345           choosing-strategy: default
1346           jenkins-ssh-credential: '{jenkins-ssh-credential}'
1347
1348 - job-template:
1349     name: '{project-name}-openstack-cron'
1350     id: github-openstack-cron
1351     <<: *lf_openstack_cron
1352
1353     scm:
1354       - lf-infra-github-scm:
1355           url: '{git-clone-url}{github-org}/{project}'
1356           refspec: ''
1357           branch: 'refs/heads/{branch}'
1358           submodule-recursive: true
1359           submodule-timeout: '{submodule-timeout}'
1360           choosing-strategy: default
1361           jenkins-ssh-credential: '{jenkins-ssh-credential}'
1362
1363 ################
1364 # Packer Merge #
1365 ################
1366
1367 - lf_packer_merge: &lf_packer_merge
1368     name: lf-packer-merge
1369
1370     ######################
1371     # Default parameters #
1372     ######################
1373
1374     openstack: true
1375     openstack-cloud: vex
1376
1377     #####################
1378     # Job Configuration #
1379     #####################
1380
1381     parameters:
1382       - lf-infra-parameters:
1383           project: '{project}'
1384           stream: '{stream}'
1385           branch: '{branch}'
1386       - lf-packer-parameters:
1387           packer-version: '{packer-version}'
1388
1389     builders:
1390       - lf-infra-packer-build:
1391           openstack: '{openstack}'
1392           openstack-cloud: '{openstack-cloud}'
1393           packer-cloud-settings: '{packer-cloud-settings}'
1394           packer-version: '{packer-version}'
1395           platform: '{platforms}'
1396           template: '{templates}'
1397
1398 - job-template:
1399     name: '{project-name}-packer-merge-{platforms}-{templates}'
1400     id: gerrit-packer-merge
1401     <<: *lf_packer_common
1402     # yamllint disable-line rule:key-duplicates
1403     <<: *lf_packer_merge
1404
1405     ######################
1406     # Default parameters #
1407     ######################
1408
1409     git-url: '$GIT_URL/$GERRIT_PROJECT'
1410
1411     gerrit_merge_triggers:
1412       - change-merged-event
1413       - comment-added-contains-event:
1414           comment-contains-value: remerge$
1415
1416     #####################
1417     # Job Configuration #
1418     #####################
1419
1420     scm:
1421       - lf-infra-gerrit-scm:
1422           git-url: '{git-url}'
1423           refspec: '$GERRIT_REFSPEC'
1424           branch: '$GERRIT_BRANCH'
1425           submodule-recursive: '{submodule-recursive}'
1426           submodule-timeout: '{submodule-timeout}'
1427           choosing-strategy: gerrit
1428           jenkins-ssh-credential: '{jenkins-ssh-credential}'
1429
1430     triggers:
1431       - timed: '{obj:cron}'
1432       - gerrit:
1433           server-name: '{gerrit-server-name}'
1434           trigger-on: '{obj:gerrit_merge_triggers}'
1435           projects:
1436             - project-compare-type: ANT
1437               project-pattern: '{project}'
1438               branches:
1439                 - branch-compare-type: ANT
1440                   branch-pattern: '**/{branch}'
1441               file-paths:
1442                 - compare-type: REG_EXP
1443                   pattern: 'packer\/provision\/.*\.sh'
1444                 - compare-type: REG_EXP
1445                   pattern: 'packer\/provision\/.*\.bat'
1446                 - compare-type: REG_EXP
1447                   pattern: 'packer\/provision\/.*\.ps1'
1448                 - compare-type: REG_EXP
1449                   pattern: 'packer\/provision\/{templates}\.yaml'
1450                 - compare-type: REG_EXP
1451                   pattern: 'packer\/provision\/local-{templates}\.yaml'
1452                 - compare-type: REG_EXP
1453                   pattern: 'packer\/templates\/{templates}\.json'
1454                 - compare-type: REG_EXP
1455                   pattern: 'packer\/vars\/{platforms}\.json'
1456
1457 - job-template:
1458     name: '{project-name}-packer-merge-{platforms}-{templates}'
1459     id: github-packer-merge
1460     <<: *lf_packer_common
1461     # yamllint disable-line rule:key-duplicates
1462     <<: *lf_packer_merge
1463
1464     #####################
1465     # Job Configuration #
1466     #####################
1467
1468     properties:
1469       - lf-infra-properties:
1470           project: '{project}'
1471           build-days-to-keep: 7
1472       - github:
1473           url: '{github-url}/{github-org}/{project}'
1474
1475     scm:
1476       - lf-infra-github-scm:
1477           url: '{git-clone-url}{github-org}/{project}'
1478           refspec: >
1479               +refs/heads/*:refs/remotes/origin/*
1480               +refs/pull/*:refs/remotes/origin/pr/*
1481           branch: '$GERRIT_REFSPEC'
1482           submodule-recursive: '{submodule-recursive}'
1483           submodule-timeout: '{submodule-timeout}'
1484           choosing-strategy: default
1485           jenkins-ssh-credential: '{jenkins-ssh-credential}'
1486
1487     triggers:
1488       - timed: '{obj:cron}'
1489       - github
1490       - pollscm:
1491           cron: ''
1492
1493       - github-pull-request:
1494           trigger-phrase: '^remerge$'
1495           only-trigger-phrase: true
1496           status-context: 'Packer {platforms}-{templates} Merge'
1497           permit-all: true
1498           github-hooks: true
1499           org-list:
1500             - '{github-org}'
1501           white-list: '{obj:github_pr_whitelist}'
1502           admin-list: '{obj:github_pr_admin_list}'
1503           # included-regions MUST match Gerrit Trigger file-paths
1504           included-regions:
1505             - 'packer\/provision\/.*\.sh'
1506             - 'packer\/provision\/.*\.bat'
1507             - 'packer\/provision\/.*\.ps1'
1508             - 'packer\/provision\/{templates}\.yaml'
1509             - 'packer\/provision\/local-{templates}\.yaml'
1510             - 'packer\/templates\/{templates}\.json'
1511             - 'packer\/vars\/{platforms}\.json'
1512           white-list-target-branches:
1513             - '{branch}'
1514
1515 #################
1516 # Packer Verify #
1517 #################
1518
1519 - lf_packer_verify: &lf_packer_verify
1520     name: lf-packer-verify
1521
1522     ######################
1523     # Default parameters #
1524     ######################
1525
1526     build-timeout: 10
1527     openstack: true
1528     openstack-cloud: vex
1529
1530     gerrit_verify_triggers:
1531       - patchset-created-event:
1532           exclude-drafts: true
1533           exclude-trivial-rebase: false
1534           exclude-no-code-change: false
1535       - draft-published-event
1536       - comment-added-contains-event:
1537           comment-contains-value: '^Patch Set[ ]+[0-9]+:([ ]+|[\n]+)(recheck|reverify)$'
1538
1539     gerrit_trigger_file_paths:
1540       - compare-type: REG_EXP
1541         pattern: 'packer\/.*'
1542
1543     # github_included_regions MUST match gerrit_trigger_file_paths
1544     github_included_regions:
1545       - 'packer\/.*'
1546
1547     #####################
1548     # Job Configuration #
1549     #####################
1550
1551     concurrent: true
1552
1553     builders:
1554       - lf-infra-packer-validate:
1555           openstack: '{openstack}'
1556           openstack-cloud: '{openstack-cloud}'
1557           packer-cloud-settings: '{packer-cloud-settings}'
1558           packer-version: '{packer-version}'
1559
1560 - job-template:
1561     name: '{project-name}-packer-verify'
1562     id: gerrit-packer-verify
1563     <<: *lf_packer_common
1564     # yamllint disable-line rule:key-duplicates
1565     <<: *lf_packer_verify
1566
1567     ######################
1568     # Default parameters #
1569     ######################
1570
1571     git-url: '$GIT_URL/$GERRIT_PROJECT'
1572
1573     #####################
1574     # Job Configuration #
1575     #####################
1576
1577     scm:
1578       - lf-infra-gerrit-scm:
1579           git-url: '{git-url}'
1580           refspec: '$GERRIT_REFSPEC'
1581           branch: '$GERRIT_BRANCH'
1582           submodule-recursive: '{submodule-recursive}'
1583           submodule-timeout: '{submodule-timeout}'
1584           choosing-strategy: gerrit
1585           jenkins-ssh-credential: '{jenkins-ssh-credential}'
1586
1587     triggers:
1588       - gerrit:
1589           server-name: '{gerrit-server-name}'
1590           trigger-on: '{obj:gerrit_verify_triggers}'
1591           projects:
1592             - project-compare-type: ANT
1593               project-pattern: '{project}'
1594               branches:
1595                 - branch-compare-type: ANT
1596                   branch-pattern: '**/{branch}'
1597               file-paths: '{obj:gerrit_trigger_file_paths}'
1598
1599 - job-template:
1600     name: '{project-name}-packer-verify'
1601     id: github-packer-verify
1602     <<: *lf_packer_common
1603     # yamllint disable-line rule:key-duplicates
1604     <<: *lf_packer_verify
1605
1606     #####################
1607     # Job Configuration #
1608     #####################
1609
1610     properties:
1611       - lf-infra-properties:
1612           project: '{project}'
1613           build-days-to-keep: 7
1614       - github:
1615           url: '{github-url}/{github-org}/{project}'
1616
1617     scm:
1618       - lf-infra-github-scm:
1619           url: '{git-clone-url}{github-org}/{project}'
1620           refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
1621           branch: '$sha1'
1622           submodule-recursive: '{submodule-recursive}'
1623           submodule-timeout: '{submodule-timeout}'
1624           choosing-strategy: default
1625           jenkins-ssh-credential: '{jenkins-ssh-credential}'
1626
1627     triggers:
1628       - github-pull-request:
1629           trigger-phrase: '^(recheck|reverify)$'
1630           only-trigger-phrase: false
1631           status-context: 'Packer Verify'
1632           permit-all: true
1633           github-hooks: true
1634           included-regions: '{obj:github_included_regions}'
1635           white-list-target-branches:
1636             - '{branch}'