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'
27 - gerrit-packer-verify
31 name: '{project-name}-github-packer-jobs'
37 - github-packer-verify
46 - config-file-provider:
49 target: '$HOME/.config/jenkins_jobs/jenkins_jobs.ini'
52 name: lf-infra-jjbini-sandbox
53 # TODO: Consolidate this into jjbini when JJB2.0 is available.
55 - config-file-provider:
57 - file-id: jjbini-sandbox
58 target: '$HOME/.config/jenkins_jobs/jenkins_jobs.ini'
60 - lf_packer_file_paths: &lf_packer_file_paths
61 name: lf-packer-file-paths
64 pattern: 'packer/vars/{platforms}.json'
66 pattern: 'packer/templates/{templates}.json'
68 pattern: 'packer/provision/*.sh'
70 pattern: 'packer/provision/{templates}.yaml'
72 pattern: 'packer/provision/local-{templates}.yaml'
74 pattern: 'packer/provision/lib/**'
76 - lf_packer: &lf_packer_common
77 name: lf-packer-common
78 # Provide configuration common in packer jobs.
80 ######################
81 # Default parameters #
82 ######################
87 submodule-recursive: true
88 packer-cloud-settings: packer-cloud-env
94 project-type: freestyle
98 - lf-infra-properties:
100 build-days-to-keep: 7
103 - lf-infra-parameters:
107 lftools-version: '{lftools-version}'
108 - lf-infra-packer-parameters:
109 packer-version: '{packer-version}'
113 build-timeout: '{build-timeout}'
114 jenkins-ssh-credential: '{jenkins-ssh-credential}'
120 name: lf-infra-jjb-parameters
124 default: '{jjb-version}'
125 description: Jenkins Job Builder version to download and install.
128 name: lf-infra-packer-parameters
132 default: '{packer-version}'
133 description: Packer version to download and install.
135 - lf_jjb_common: &lf_jjb_common
138 ######################
139 # Default parameters #
140 ######################
146 submodule-recursive: true
148 gerrit_trigger_file_paths:
154 pattern: '**/global-jjb'
156 #####################
157 # Job Configuration #
158 #####################
160 project-type: freestyle
164 - lf-infra-properties:
166 build-days-to-keep: 7
169 - lf-infra-parameters:
173 lftools-version: '{lftools-version}'
174 - lf-infra-jjb-parameters:
175 jjb-version: '{jjb-version}'
179 build-timeout: '{build-timeout}'
180 jenkins-ssh-credential: '{jenkins-ssh-credential}'
185 ######################
186 # Gerrit Branch Lock #
187 ######################
190 name: '{project-name}-gerrit-branch-lock-{stream}'
191 id: gerrit-branch-lock
193 ######################
194 # Default parameters #
195 ######################
198 git-url: '$GIT_URL/$GERRIT_PROJECT'
200 gerrit_merge_triggers:
201 - comment-added-contains-event:
202 comment-contains-value: (un)?lock branch$
204 #####################
205 # Job Configuration #
206 #####################
208 project-type: freestyle
212 - lf-infra-properties:
214 build-days-to-keep: 1
217 - lf-infra-parameters:
221 lftools-version: '{lftools-version}'
226 jenkins-ssh-credential: '{jenkins-ssh-credential}'
229 - lf-infra-gerrit-scm:
233 submodule-recursive: false
234 choosing-strategy: default
235 jenkins-ssh-credential: '{jenkins-ssh-credential}'
239 server-name: '{gerrit-server-name}'
240 trigger-on: '{obj:gerrit_merge_triggers}'
242 - project-compare-type: ANT
243 project-pattern: '{project}'
245 - branch-compare-type: ANT
246 branch-pattern: '**/{branch}'
249 - shell: !include-raw-escape: ../shell/gerrit-branch-lock.sh
255 ##########################################
256 # Jenkins Configuration Management Merge #
257 ##########################################
260 name: lf-jenkins-cfg-clouds
264 properties-content: 'jenkins_silos={jenkins-silos}'
265 - shell: !include-raw-escape: ../shell/jenkins-configure-clouds.sh
266 - shell: rm "$HOME/.config/jenkins_jobs/jenkins_jobs.ini"
269 name: lf-jenkins-cfg-global-vars
273 properties-content: 'jenkins_silos={jenkins-silos}'
274 - shell: !include-raw-escape: ../shell/jenkins-configure-global-vars.sh
275 - shell: rm "$HOME/.config/jenkins_jobs/jenkins_jobs.ini"
277 - lf_jenkins_configuration: &lf_jenkins_cfg_merge
278 name: lf-jenkins-cfg-merge
280 ######################
281 # Default parameters #
282 ######################
286 git-url: '$GIT_URL/$GERRIT_PROJECT'
287 jenkins-silos: production sandbox
289 gerrit_merge_triggers:
290 - change-merged-event
291 - comment-added-contains-event:
292 comment-contains-value: remerge$
294 gerrit_trigger_file_paths:
296 pattern: 'jenkins-config/**'
298 #####################
299 # Job Configuration #
300 #####################
302 project-type: freestyle
307 - lf-infra-properties:
309 build-days-to-keep: 1
312 - lf-infra-parameters:
316 lftools-version: '{lftools-version}'
321 jenkins-ssh-credential: '{jenkins-ssh-credential}'
324 - shell: !include-raw-escape:
325 - ../shell/lftools-install.sh
326 - lf-jenkins-cfg-global-vars:
327 jenkins-silos: '{jenkins-silos}'
328 - lf-jenkins-cfg-clouds:
329 jenkins-silos: '{jenkins-silos}'
335 name: '{project-name}-jenkins-cfg-merge'
336 id: gerrit-jenkins-cfg-merge
337 <<: *lf_jenkins_cfg_merge
340 - lf-infra-gerrit-scm:
342 refspec: 'refs/heads/{branch}'
344 submodule-recursive: true
345 choosing-strategy: default
346 jenkins-ssh-credential: '{jenkins-ssh-credential}'
349 - timed: '{obj:cron}'
351 server-name: '{gerrit-server-name}'
352 trigger-on: '{obj:gerrit_merge_triggers}'
354 - project-compare-type: ANT
355 project-pattern: '{project}'
357 - branch-compare-type: ANT
358 branch-pattern: '**/{branch}'
359 file-paths: '{obj:gerrit_trigger_file_paths}'
362 name: '{project-name}-jenkins-cfg-merge'
363 id: github-jenkins-cfg-merge
364 <<: *lf_jenkins_cfg_merge
368 url: '{git-url}/{github-org}/{project}'
371 - lf-infra-github-scm:
372 url: '{git-clone-url}{github-org}/{project}'
373 refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
375 submodule-recursive: true
376 choosing-strategy: default
377 jenkins-ssh-credential: '{jenkins-ssh-credential}'
380 - timed: '{obj:cron}'
384 - lf-infra-github-pr-trigger:
385 trigger-phrase: '^remerge$'
386 only-trigger-phrase: true
387 status-context: 'Jenkins CFG Merge'
390 github-org: '{github-org}'
391 github_pr_whitelist: '{obj:github_pr_whitelist}'
392 github_pr_admin_list: '{obj:github_pr_admin_list}'
399 - lf_jjb_deploy_job: &lf_jjb_deploy_job
400 name: lf-jjb-deploy-job
402 ######################
403 # Default parameters #
404 ######################
407 git-url: '$GIT_URL/$GERRIT_PROJECT'
409 gerrit_jjb_deploy_job_triggers:
410 - comment-added-contains-event:
411 comment-contains-value: 'jjb-deploy[:]* (?!\*+$).+$'
413 #####################
414 # Job Configuration #
415 #####################
417 project-type: freestyle
422 - lf-infra-properties:
424 build-days-to-keep: 1
427 - lf-infra-parameters:
431 lftools-version: '{lftools-version}'
436 jenkins-ssh-credential: '{jenkins-ssh-credential}'
440 pip-packages: jenkins-job-builder
441 - lf-infra-jjbini-sandbox
442 - shell: !include-raw-escape: ../shell/jjb-deploy-job.sh
448 name: '{project-name}-jjb-deploy-job'
449 id: gerrit-jjb-deploy-job
450 <<: *lf_jjb_deploy_job
453 - lf-infra-gerrit-scm:
455 refspec: 'refs/heads/{branch}'
457 submodule-recursive: true
458 choosing-strategy: default
459 jenkins-ssh-credential: '{jenkins-ssh-credential}'
463 server-name: '{gerrit-server-name}'
464 trigger-on: '{obj:gerrit_jjb_deploy_job_triggers}'
466 - project-compare-type: ANT
467 project-pattern: '{project}'
469 - branch-compare-type: ANT
470 branch-pattern: '**/{branch}'
478 name: '{project-name}-jjb-deploy-job'
479 id: github-jjb-deploy-job
480 <<: *lf_jjb_deploy_job
484 url: '{git-url}/{github-org}/{project}'
487 - lf-infra-github-scm:
488 url: '{git-clone-url}{github-org}/{project}'
489 refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
491 submodule-recursive: true
492 choosing-strategy: default
493 jenkins-ssh-credential: '{jenkins-ssh-credential}'
496 - lf-infra-github-pr-trigger:
497 trigger-phrase: '^jjb-deploy (?!\*+$).+$'
498 only-trigger-phrase: true
499 status-context: 'JJB Deploy Job'
505 github_pr_admin_list:
512 - lf_jjb_merge: &lf_jjb_merge
515 ######################
516 # Default parameters #
517 ######################
519 gerrit_merge_triggers:
520 - change-merged-event
521 - comment-added-contains-event:
522 comment-contains-value: remerge$
524 #####################
525 # Job Configuration #
526 #####################
530 - shell: !include-raw-escape:
531 - ../shell/jjb-install.sh
532 - ../shell/jjb-merge-job.sh
535 name: '{project-name}-jjb-merge'
538 # yamllint disable-line rule:key-duplicates
541 git-url: '$GIT_URL/$GERRIT_PROJECT'
544 - lf-infra-gerrit-scm:
548 submodule-recursive: '{submodule-recursive}'
549 choosing-strategy: default
550 jenkins-ssh-credential: '{jenkins-ssh-credential}'
554 server-name: '{gerrit-server-name}'
555 trigger-on: '{obj:gerrit_merge_triggers}'
557 - project-compare-type: ANT
558 project-pattern: '{project}'
560 - branch-compare-type: ANT
561 branch-pattern: '**/{branch}'
562 file-paths: '{obj:gerrit_trigger_file_paths}'
565 name: '{project-name}-jjb-merge'
568 # yamllint disable-line rule:key-duplicates
573 url: '{git-url}/{github-org}/{project}'
576 - lf-infra-github-scm:
577 url: '{git-clone-url}{github-org}/{project}'
579 branch: 'refs/heads/{branch}'
580 submodule-recursive: '{submodule-recursive}'
581 choosing-strategy: default
582 jenkins-ssh-credential: '{jenkins-ssh-credential}'
588 - lf-infra-github-pr-trigger:
589 trigger-phrase: '^remerge$'
590 only-trigger-phrase: true
591 status-context: 'JJB Merge'
594 github-org: '{github-org}'
595 github_pr_whitelist: '{obj:github_pr_whitelist}'
596 github_pr_admin_list: '{obj:github_pr_admin_list}'
602 - lf_jjb_verify: &lf_jjb_verify
605 ######################
606 # Default parameters #
607 ######################
609 gerrit_verify_triggers:
610 - patchset-created-event:
612 exclude-trivial-rebase: false
613 exclude-no-code-change: false
614 - draft-published-event
615 - comment-added-contains-event:
616 comment-contains-value: recheck$
618 #####################
619 # Job Configuration #
620 #####################
626 - shell: !include-raw-escape:
627 - ../shell/git-validate-jira-urls.sh
628 - ../shell/jjb-install.sh
629 - ../shell/jjb-verify-job.sh
630 - ../shell/jjb-check-unicode.sh
631 - lf-infra-gpg-verify-git-signature
634 name: '{project-name}-jjb-verify'
635 id: gerrit-jjb-verify
637 # yamllint disable-line rule:key-duplicates
640 git-url: '$GIT_URL/$GERRIT_PROJECT'
643 - lf-infra-gerrit-scm:
645 refspec: '$GERRIT_REFSPEC'
646 branch: '$GERRIT_BRANCH'
647 submodule-recursive: '{submodule-recursive}'
648 choosing-strategy: gerrit
649 jenkins-ssh-credential: '{jenkins-ssh-credential}'
653 server-name: '{gerrit-server-name}'
654 trigger-on: '{obj:gerrit_verify_triggers}'
656 - project-compare-type: ANT
657 project-pattern: '{project}'
659 - branch-compare-type: ANT
660 branch-pattern: '**/{branch}'
661 file-paths: '{obj:gerrit_trigger_file_paths}'
664 name: '{project-name}-jjb-verify'
665 id: github-jjb-verify
667 # yamllint disable-line rule:key-duplicates
672 url: '{git-url}/{github-org}/{project}'
675 - lf-infra-github-scm:
676 url: '{git-clone-url}{github-org}/{project}'
677 refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
679 submodule-recursive: '{submodule-recursive}'
680 choosing-strategy: default
681 jenkins-ssh-credential: '{jenkins-ssh-credential}'
684 - lf-infra-github-pr-trigger:
685 trigger-phrase: '^recheck$'
686 only-trigger-phrase: false
687 status-context: 'JJB Verify'
693 github_pr_admin_list:
700 - lf_packer_merge: &lf_packer_merge
701 name: lf-packer-merge
703 ######################
704 # Default parameters #
705 ######################
707 gerrit_merge_triggers:
708 - change-merged-event
709 - comment-added-contains-event:
710 comment-contains-value: remerge$
712 #####################
713 # Job Configuration #
714 #####################
717 - lf-infra-packer-validate:
718 packer-cloud-settings: '{packer-cloud-settings}'
719 packer-version: '{packer-version}'
720 - lf-infra-packer-build:
721 packer-cloud-settings: '{packer-cloud-settings}'
722 packer-version: '{packer-version}'
723 platform: '{platforms}'
724 template: '{templates}'
727 name: '{project-name}-packer-merge-{platforms}-{templates}'
728 id: gerrit-packer-merge
729 <<: *lf_packer_common
730 # yamllint disable-line rule:key-duplicates
733 git-url: '$GIT_URL/$GERRIT_PROJECT'
736 - lf-infra-gerrit-scm:
738 refspec: '$GERRIT_REFSPEC'
739 branch: '$GERRIT_BRANCH'
740 submodule-recursive: '{submodule-recursive}'
741 choosing-strategy: gerrit
742 jenkins-ssh-credential: '{jenkins-ssh-credential}'
745 - timed: '00 10 1 * *'
747 server-name: '{gerrit-server-name}'
748 trigger-on: '{obj:gerrit_merge_triggers}'
750 - project-compare-type: ANT
751 project-pattern: '{project}'
753 - branch-compare-type: ANT
754 branch-pattern: '**/{branch}'
755 <<: *lf_packer_file_paths
758 name: '{project-name}-packer-merge-{platforms}-{templates}'
759 id: github-packer-merge
760 <<: *lf_packer_common
761 # yamllint disable-line rule:key-duplicates
766 url: '{git-url}/{github-org}/{project}'
769 - lf-infra-github-scm:
770 url: '{git-clone-url}{github-org}/{project}'
772 branch: 'refs/heads/{branch}'
773 submodule-recursive: '{submodule-recursive}'
774 choosing-strategy: default
775 jenkins-ssh-credential: '{jenkins-ssh-credential}'
778 - timed: '00 10 1 * *'
782 - lf-infra-github-pr-trigger:
783 trigger-phrase: '^remerge$'
784 only-trigger-phrase: true
785 status-context: 'Packer {platforms}-${templates} Merge'
788 github-org: '{github-org}'
789 github_pr_whitelist: '{obj:github_pr_whitelist}'
790 github_pr_admin_list: '{obj:github_pr_admin_list}'
796 - lf_packer_verify: &lf_packer_verify
797 name: lf-packer-verify
799 ######################
800 # Default parameters #
801 ######################
805 gerrit_verify_triggers:
806 - patchset-created-event:
808 exclude-trivial-rebase: false
809 exclude-no-code-change: false
810 - draft-published-event
811 - comment-added-contains-event:
812 comment-contains-value: recheck$
814 gerrit_trigger_file_paths:
816 pattern: 'packer/vars/**.json'
818 pattern: 'packer/templates/**.json'
820 pattern: 'packer/provision/**.sh'
822 pattern: 'packer/provision/lib/**'
824 #####################
825 # Job Configuration #
826 #####################
831 - lf-infra-packer-validate:
832 packer-cloud-settings: '{packer-cloud-settings}'
833 packer-version: '{packer-version}'
836 name: '{project-name}-packer-verify'
837 id: gerrit-packer-verify
838 <<: *lf_packer_common
839 # yamllint disable-line rule:key-duplicates
840 <<: *lf_packer_verify
842 git-url: '$GIT_URL/$GERRIT_PROJECT'
845 - lf-infra-gerrit-scm:
847 refspec: '$GERRIT_REFSPEC'
848 branch: '$GERRIT_BRANCH'
849 submodule-recursive: '{submodule-recursive}'
850 choosing-strategy: gerrit
851 jenkins-ssh-credential: '{jenkins-ssh-credential}'
855 server-name: '{gerrit-server-name}'
856 trigger-on: '{obj:gerrit_verify_triggers}'
858 - project-compare-type: ANT
859 project-pattern: '{project}'
861 - branch-compare-type: ANT
862 branch-pattern: '**/{branch}'
863 file-paths: '{obj:gerrit_trigger_file_paths}'
866 name: '{project-name}-packer-verify'
867 id: github-packer-verify
868 <<: *lf_packer_common
869 # yamllint disable-line rule:key-duplicates
870 <<: *lf_packer_verify
874 url: '{git-url}/{github-org}/{project}'
877 - lf-infra-github-scm:
878 url: '{git-clone-url}{github-org}/{project}'
879 refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
881 submodule-recursive: '{submodule-recursive}'
882 choosing-strategy: default
883 jenkins-ssh-credential: '{jenkins-ssh-credential}'
886 - lf-infra-github-pr-trigger:
887 trigger-phrase: '^recheck$'
888 only-trigger-phrase: false
889 status-context: 'Packer Verify'
895 github_pr_admin_list: