3 name: '{project-name}-ci-jobs'
6 - gerrit-jenkins-cfg-merge
7 - gerrit-jjb-deploy-job
12 name: '{project-name}-github-ci-jobs'
15 - github-jenkins-cfg-merge
16 - github-jjb-deploy-job
21 name: '{project-name}-packer-jobs'
25 - gerrit-packer-verify
29 name: '{project-name}-github-packer-jobs'
33 - github-packer-verify
42 - config-file-provider:
45 target: '$HOME/.config/jenkins_jobs/jenkins_jobs.ini'
48 name: lf-infra-jjbini-sandbox
49 # TODO: Consolidate this into jjbini when JJB2.0 is available.
51 - config-file-provider:
53 - file-id: jjbini-sandbox
54 target: '$HOME/.config/jenkins_jobs/jenkins_jobs.ini'
56 - lf_packer_file_paths: &lf_packer_file_paths
57 name: lf-packer-file-paths
60 pattern: 'packer/vars/{platforms}.json'
62 pattern: 'packer/templates/{templates}.json'
64 pattern: 'packer/provision/*.sh'
66 pattern: 'packer/provision/{templates}.yaml'
68 pattern: 'packer/provision/local-{templates}.yaml'
70 pattern: 'packer/provision/lib/**'
72 - lf_packer: &lf_packer_common
73 name: lf-packer-common
74 # Provide configuration common in packer jobs.
76 ######################
77 # Default parameters #
78 ######################
84 submodule-recursive: true
85 packer-cloud-settings: packer-cloud-env
92 project-type: freestyle
96 - lf-infra-properties:
101 - lf-infra-parameters:
105 lftools-version: '{lftools-version}'
106 - lf-packer-parameters:
107 packer-version: '{packer-version}'
111 build-timeout: '{build-timeout}'
112 jenkins-ssh-credential: '{jenkins-ssh-credential}'
118 name: lf-infra-jjb-parameters
122 default: '{jjb-version}'
123 description: Jenkins Job Builder version to download and install.
126 name: lf-packer-parameters
130 default: '{packer-version}'
131 description: Packer version to download and install.
133 - lf_jjb_common: &lf_jjb_common
136 ######################
137 # Default parameters #
138 ######################
144 submodule-recursive: true
146 gerrit_trigger_file_paths:
148 pattern: '**/*.groovy'
156 pattern: '**/global-jjb'
158 #####################
159 # Job Configuration #
160 #####################
162 project-type: freestyle
166 - lf-infra-properties:
168 build-days-to-keep: 7
171 - lf-infra-parameters:
175 lftools-version: '{lftools-version}'
176 - lf-infra-jjb-parameters:
177 jjb-version: '{jjb-version}'
181 build-timeout: '{build-timeout}'
182 jenkins-ssh-credential: '{jenkins-ssh-credential}'
187 ######################
188 # Gerrit Branch Lock #
189 ######################
192 name: '{project-name}-gerrit-branch-lock-{stream}'
193 id: gerrit-branch-lock
195 ######################
196 # Default parameters #
197 ######################
200 git-url: '$GIT_URL/$GERRIT_PROJECT'
202 gerrit_merge_triggers:
203 - comment-added-contains-event:
204 comment-contains-value: (un)?lock branch$
206 #####################
207 # Job Configuration #
208 #####################
210 project-type: freestyle
214 - lf-infra-properties:
216 build-days-to-keep: 1
219 - lf-infra-parameters:
223 lftools-version: '{lftools-version}'
228 jenkins-ssh-credential: '{jenkins-ssh-credential}'
231 - lf-infra-gerrit-scm:
235 submodule-recursive: false
236 choosing-strategy: default
237 jenkins-ssh-credential: '{jenkins-ssh-credential}'
241 server-name: '{gerrit-server-name}'
242 trigger-on: '{obj:gerrit_merge_triggers}'
244 - project-compare-type: ANT
245 project-pattern: '{project}'
247 - branch-compare-type: ANT
248 branch-pattern: '**/{branch}'
251 - shell: !include-raw-escape: ../shell/gerrit-branch-lock.sh
257 ##########################################
258 # Jenkins Configuration Management Merge #
259 ##########################################
262 name: lf-jenkins-cfg-clouds
266 properties-content: 'jenkins_silos={jenkins-silos}'
267 - shell: !include-raw-escape: ../shell/jenkins-configure-clouds.sh
268 - shell: rm "$HOME/.config/jenkins_jobs/jenkins_jobs.ini"
271 name: lf-jenkins-cfg-global-vars
275 properties-content: 'jenkins_silos={jenkins-silos}'
276 - shell: !include-raw-escape: ../shell/jenkins-configure-global-vars.sh
277 - shell: rm "$HOME/.config/jenkins_jobs/jenkins_jobs.ini"
279 - lf_jenkins_configuration: &lf_jenkins_cfg_merge
280 name: lf-jenkins-cfg-merge
282 ######################
283 # Default parameters #
284 ######################
288 git-url: '$GIT_URL/$GERRIT_PROJECT'
289 jenkins-silos: production sandbox
291 gerrit_merge_triggers:
292 - change-merged-event
293 - comment-added-contains-event:
294 comment-contains-value: remerge$
296 gerrit_trigger_file_paths:
298 pattern: 'jenkins-config/**'
300 #####################
301 # Job Configuration #
302 #####################
304 project-type: freestyle
309 - lf-infra-properties:
311 build-days-to-keep: 1
314 - lf-infra-parameters:
318 lftools-version: '{lftools-version}'
323 jenkins-ssh-credential: '{jenkins-ssh-credential}'
326 - shell: !include-raw-escape:
327 - ../shell/lftools-install.sh
328 - lf-jenkins-cfg-global-vars:
329 jenkins-silos: '{jenkins-silos}'
330 - lf-jenkins-cfg-clouds:
331 jenkins-silos: '{jenkins-silos}'
337 name: '{project-name}-jenkins-cfg-merge'
338 id: gerrit-jenkins-cfg-merge
339 <<: *lf_jenkins_cfg_merge
342 - lf-infra-gerrit-scm:
344 refspec: 'refs/heads/{branch}'
346 submodule-recursive: true
347 choosing-strategy: default
348 jenkins-ssh-credential: '{jenkins-ssh-credential}'
351 - timed: '{obj:cron}'
353 server-name: '{gerrit-server-name}'
354 trigger-on: '{obj:gerrit_merge_triggers}'
356 - project-compare-type: ANT
357 project-pattern: '{project}'
359 - branch-compare-type: ANT
360 branch-pattern: '**/{branch}'
361 file-paths: '{obj:gerrit_trigger_file_paths}'
364 name: '{project-name}-jenkins-cfg-merge'
365 id: github-jenkins-cfg-merge
366 <<: *lf_jenkins_cfg_merge
370 url: '{git-url}/{github-org}/{project}'
373 - lf-infra-github-scm:
374 url: '{git-clone-url}{github-org}/{project}'
376 branch: 'refs/heads/{branch}'
377 submodule-recursive: true
378 choosing-strategy: default
379 jenkins-ssh-credential: '{jenkins-ssh-credential}'
382 - timed: '{obj:cron}'
386 - lf-infra-github-pr-trigger:
387 trigger-phrase: '^remerge$'
388 only-trigger-phrase: true
389 status-context: 'Jenkins CFG Merge'
392 github-org: '{github-org}'
393 github_pr_whitelist: '{obj:github_pr_whitelist}'
394 github_pr_admin_list: '{obj:github_pr_admin_list}'
401 - lf_jjb_deploy_job: &lf_jjb_deploy_job
402 name: lf-jjb-deploy-job
404 ######################
405 # Default parameters #
406 ######################
409 git-url: '$GIT_URL/$GERRIT_PROJECT'
411 gerrit_jjb_deploy_job_triggers:
412 - comment-added-contains-event:
413 comment-contains-value: 'jjb-deploy[:]* (?!\*+$).+$'
415 #####################
416 # Job Configuration #
417 #####################
419 project-type: freestyle
424 - lf-infra-properties:
426 build-days-to-keep: 1
429 - lf-infra-parameters:
433 lftools-version: '{lftools-version}'
438 jenkins-ssh-credential: '{jenkins-ssh-credential}'
442 pip-packages: jenkins-job-builder
443 - lf-infra-jjbini-sandbox
444 - shell: !include-raw-escape: ../shell/jjb-deploy-job.sh
450 name: '{project-name}-jjb-deploy-job'
451 id: gerrit-jjb-deploy-job
452 <<: *lf_jjb_deploy_job
455 - lf-infra-gerrit-scm:
457 refspec: 'refs/heads/{branch}'
459 submodule-recursive: true
460 choosing-strategy: default
461 jenkins-ssh-credential: '{jenkins-ssh-credential}'
465 server-name: '{gerrit-server-name}'
466 trigger-on: '{obj:gerrit_jjb_deploy_job_triggers}'
468 - project-compare-type: ANT
469 project-pattern: '**'
471 - branch-compare-type: ANT
480 name: '{project-name}-jjb-deploy-job'
481 id: github-jjb-deploy-job
482 <<: *lf_jjb_deploy_job
486 url: '{git-url}/{github-org}/{project}'
489 - lf-infra-github-scm:
490 url: '{git-clone-url}{github-org}/{project}'
491 refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
493 submodule-recursive: true
494 choosing-strategy: default
495 jenkins-ssh-credential: '{jenkins-ssh-credential}'
498 - lf-infra-github-pr-trigger:
499 trigger-phrase: '^jjb-deploy (?!\*+$).+$'
500 only-trigger-phrase: true
501 status-context: 'JJB Deploy Job'
507 github_pr_admin_list:
514 - lf_jjb_merge: &lf_jjb_merge
517 ######################
518 # Default parameters #
519 ######################
521 gerrit_merge_triggers:
522 - change-merged-event
523 - comment-added-contains-event:
524 comment-contains-value: remerge$
526 #####################
527 # Job Configuration #
528 #####################
532 - shell: !include-raw-escape:
533 - ../shell/jjb-install.sh
534 - ../shell/jjb-merge-job.sh
535 - ../shell/jjb-cleanup.sh
538 name: '{project-name}-jjb-merge'
541 # yamllint disable-line rule:key-duplicates
544 git-url: '$GIT_URL/$GERRIT_PROJECT'
547 - lf-infra-gerrit-scm:
551 submodule-recursive: '{submodule-recursive}'
552 choosing-strategy: default
553 jenkins-ssh-credential: '{jenkins-ssh-credential}'
557 server-name: '{gerrit-server-name}'
558 trigger-on: '{obj:gerrit_merge_triggers}'
560 - project-compare-type: ANT
561 project-pattern: '{project}'
563 - branch-compare-type: ANT
564 branch-pattern: '**/{branch}'
565 file-paths: '{obj:gerrit_trigger_file_paths}'
568 name: '{project-name}-jjb-merge'
571 # yamllint disable-line rule:key-duplicates
576 url: '{git-url}/{github-org}/{project}'
579 - lf-infra-github-scm:
580 url: '{git-clone-url}{github-org}/{project}'
582 branch: 'refs/heads/{branch}'
583 submodule-recursive: '{submodule-recursive}'
584 choosing-strategy: default
585 jenkins-ssh-credential: '{jenkins-ssh-credential}'
591 - lf-infra-github-pr-trigger:
592 trigger-phrase: '^remerge$'
593 only-trigger-phrase: true
594 status-context: 'JJB Merge'
597 github-org: '{github-org}'
598 github_pr_whitelist: '{obj:github_pr_whitelist}'
599 github_pr_admin_list: '{obj:github_pr_admin_list}'
605 - lf_jjb_verify: &lf_jjb_verify
608 ######################
609 # Default parameters #
610 ######################
612 gerrit_verify_triggers:
613 - patchset-created-event:
615 exclude-trivial-rebase: false
616 exclude-no-code-change: false
617 - draft-published-event
618 - comment-added-contains-event:
619 comment-contains-value: recheck$
621 #####################
622 # Job Configuration #
623 #####################
629 - shell: !include-raw-escape:
630 - ../shell/git-validate-jira-urls.sh
631 - ../shell/jjb-install.sh
632 - ../shell/jjb-verify-job.sh
633 - ../shell/jjb-check-unicode.sh
634 - ../shell/jjb-cleanup.sh
635 - lf-infra-gpg-verify-git-signature
638 name: '{project-name}-jjb-verify'
639 id: gerrit-jjb-verify
641 # yamllint disable-line rule:key-duplicates
644 git-url: '$GIT_URL/$GERRIT_PROJECT'
647 - lf-infra-gerrit-scm:
649 refspec: '$GERRIT_REFSPEC'
650 branch: '$GERRIT_BRANCH'
651 submodule-recursive: '{submodule-recursive}'
652 choosing-strategy: gerrit
653 jenkins-ssh-credential: '{jenkins-ssh-credential}'
657 server-name: '{gerrit-server-name}'
658 trigger-on: '{obj:gerrit_verify_triggers}'
660 - project-compare-type: ANT
661 project-pattern: '{project}'
663 - branch-compare-type: ANT
664 branch-pattern: '**/{branch}'
665 file-paths: '{obj:gerrit_trigger_file_paths}'
668 name: '{project-name}-jjb-verify'
669 id: github-jjb-verify
671 # yamllint disable-line rule:key-duplicates
676 url: '{git-url}/{github-org}/{project}'
679 - lf-infra-github-scm:
680 url: '{git-clone-url}{github-org}/{project}'
681 refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
683 submodule-recursive: '{submodule-recursive}'
684 choosing-strategy: default
685 jenkins-ssh-credential: '{jenkins-ssh-credential}'
688 - lf-infra-github-pr-trigger:
689 trigger-phrase: '^recheck$'
690 only-trigger-phrase: false
691 status-context: 'JJB Verify'
697 github_pr_admin_list:
704 - lf_packer_merge: &lf_packer_merge
705 name: lf-packer-merge
707 ######################
708 # Default parameters #
709 ######################
711 gerrit_merge_triggers:
712 - change-merged-event
713 - comment-added-contains-event:
714 comment-contains-value: remerge$
716 #####################
717 # Job Configuration #
718 #####################
721 - lf-infra-packer-validate:
722 packer-cloud-settings: '{packer-cloud-settings}'
723 packer-version: '{packer-version}'
724 - lf-infra-packer-build:
725 packer-cloud-settings: '{packer-cloud-settings}'
726 packer-version: '{packer-version}'
727 platform: '{platforms}'
728 template: '{templates}'
731 name: '{project-name}-packer-merge-{platforms}-{templates}'
732 id: gerrit-packer-merge
733 <<: *lf_packer_common
734 # yamllint disable-line rule:key-duplicates
737 git-url: '$GIT_URL/$GERRIT_PROJECT'
740 - lf-infra-gerrit-scm:
742 refspec: '$GERRIT_REFSPEC'
743 branch: '$GERRIT_BRANCH'
744 submodule-recursive: '{submodule-recursive}'
745 choosing-strategy: gerrit
746 jenkins-ssh-credential: '{jenkins-ssh-credential}'
751 server-name: '{gerrit-server-name}'
752 trigger-on: '{obj:gerrit_merge_triggers}'
754 - project-compare-type: ANT
755 project-pattern: '{project}'
757 - branch-compare-type: ANT
758 branch-pattern: '**/{branch}'
759 <<: *lf_packer_file_paths
762 name: '{project-name}-packer-merge-{platforms}-{templates}'
763 id: github-packer-merge
764 <<: *lf_packer_common
765 # yamllint disable-line rule:key-duplicates
770 url: '{git-url}/{github-org}/{project}'
773 - lf-infra-github-scm:
774 url: '{git-clone-url}{github-org}/{project}'
776 branch: 'refs/heads/{branch}'
777 submodule-recursive: '{submodule-recursive}'
778 choosing-strategy: default
779 jenkins-ssh-credential: '{jenkins-ssh-credential}'
786 - lf-infra-github-pr-trigger:
787 trigger-phrase: '^remerge$'
788 only-trigger-phrase: true
789 status-context: 'Packer {platforms}-${templates} Merge'
792 github-org: '{github-org}'
793 github_pr_whitelist: '{obj:github_pr_whitelist}'
794 github_pr_admin_list: '{obj:github_pr_admin_list}'
800 - lf_packer_verify: &lf_packer_verify
801 name: lf-packer-verify
803 ######################
804 # Default parameters #
805 ######################
809 gerrit_verify_triggers:
810 - patchset-created-event:
812 exclude-trivial-rebase: false
813 exclude-no-code-change: false
814 - draft-published-event
815 - comment-added-contains-event:
816 comment-contains-value: recheck$
818 gerrit_trigger_file_paths:
820 pattern: 'packer/vars/**.json'
822 pattern: 'packer/templates/**.json'
824 pattern: 'packer/provision/**.sh'
826 pattern: 'packer/provision/lib/**'
828 #####################
829 # Job Configuration #
830 #####################
835 - lf-infra-packer-validate:
836 packer-cloud-settings: '{packer-cloud-settings}'
837 packer-version: '{packer-version}'
840 name: '{project-name}-packer-verify'
841 id: gerrit-packer-verify
842 <<: *lf_packer_common
843 # yamllint disable-line rule:key-duplicates
844 <<: *lf_packer_verify
846 git-url: '$GIT_URL/$GERRIT_PROJECT'
849 - lf-infra-gerrit-scm:
851 refspec: '$GERRIT_REFSPEC'
852 branch: '$GERRIT_BRANCH'
853 submodule-recursive: '{submodule-recursive}'
854 choosing-strategy: gerrit
855 jenkins-ssh-credential: '{jenkins-ssh-credential}'
859 server-name: '{gerrit-server-name}'
860 trigger-on: '{obj:gerrit_verify_triggers}'
862 - project-compare-type: ANT
863 project-pattern: '{project}'
865 - branch-compare-type: ANT
866 branch-pattern: '**/{branch}'
867 file-paths: '{obj:gerrit_trigger_file_paths}'
870 name: '{project-name}-packer-verify'
871 id: github-packer-verify
872 <<: *lf_packer_common
873 # yamllint disable-line rule:key-duplicates
874 <<: *lf_packer_verify
878 url: '{git-url}/{github-org}/{project}'
881 - lf-infra-github-scm:
882 url: '{git-clone-url}{github-org}/{project}'
883 refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
885 submodule-recursive: '{submodule-recursive}'
886 choosing-strategy: default
887 jenkins-ssh-credential: '{jenkins-ssh-credential}'
890 - lf-infra-github-pr-trigger:
891 trigger-phrase: '^recheck$'
892 only-trigger-phrase: false
893 status-context: 'Packer Verify'
899 github_pr_admin_list: