3 name: '{project-name}-ci-jobs'
8 - gerrit-jjb-deploy-job
13 name: '{project-name}-github-ci-jobs'
18 - github-jjb-deploy-job
23 name: '{project-name}-packer-jobs'
29 - gerrit-packer-verify
33 name: '{project-name}-github-packer-jobs'
39 - github-packer-verify
48 - config-file-provider:
51 target: '$HOME/.config/jenkins_jobs/jenkins_jobs.ini'
54 name: lf-infra-jjbini-sandbox
55 # TODO: Consolidate this into jjbini when JJB2.0 is available.
57 - config-file-provider:
59 - file-id: jjbini-sandbox
60 target: '$HOME/.config/jenkins_jobs/jenkins_jobs.ini'
62 - lf_packer_file_paths: &lf_packer_file_paths
63 name: lf-packer-file-paths
65 # Common files for all projects
67 pattern: 'packer/vars/{platforms}.json'
69 pattern: 'packer/templates/{templates}.json'
71 pattern: 'packer/provision/{templates}.sh'
73 pattern: 'packer/provision/lib/**'
75 - lf_packer: &lf_packer_common
76 name: lf-packer-common
77 # Provide configuration common in packer jobs.
79 ######################
80 # Default parameters #
81 ######################
86 submodule-recursive: true
87 packer-cloud-settings: packer-cloud-env
93 project-type: freestyle
97 - lf-infra-properties:
102 - lf-infra-parameters:
106 lftools-version: '{lftools-version}'
107 - lf-infra-packer-parameters:
108 packer-version: '{packer-version}'
112 build-timeout: '{build-timeout}'
113 jenkins-ssh-credential: '{jenkins-ssh-credential}'
119 name: lf-infra-jjb-parameters
123 default: '{jjb-version}'
124 description: Jenkins Job Builder version to download and install.
127 name: lf-infra-packer-parameters
131 default: '{packer-version}'
132 description: Packer version to download and install.
134 - lf_jjb_common: &lf_jjb_common
137 ######################
138 # Default parameters #
139 ######################
144 submodule-recursive: true
146 gerrit_trigger_file_paths:
152 pattern: '**/global-jjb'
154 #####################
155 # Job Configuration #
156 #####################
158 project-type: freestyle
162 - lf-infra-properties:
164 build-days-to-keep: 7
167 - lf-infra-parameters:
171 lftools-version: '{lftools-version}'
172 - lf-infra-jjb-parameters:
173 jjb-version: '{jjb-version}'
177 build-timeout: '{build-timeout}'
178 jenkins-ssh-credential: '{jenkins-ssh-credential}'
183 ######################
184 # Gerrit Branch Lock #
185 ######################
188 name: '{project-name}-gerrit-branch-lock-{stream}'
189 id: gerrit-branch-lock
191 ######################
192 # Default parameters #
193 ######################
196 git-url: '$GIT_URL/$GERRIT_PROJECT'
198 gerrit_merge_triggers:
199 - comment-added-contains-event:
200 comment-contains-value: (un)?lock branch$
202 #####################
203 # Job Configuration #
204 #####################
206 project-type: freestyle
210 - lf-infra-properties:
212 build-days-to-keep: 1
215 - lf-infra-parameters:
219 lftools-version: '{lftools-version}'
224 jenkins-ssh-credential: '{jenkins-ssh-credential}'
227 - lf-infra-gerrit-scm:
231 submodule-recursive: false
232 choosing-strategy: default
233 jenkins-ssh-credential: '{jenkins-ssh-credential}'
237 server-name: '{gerrit-server-name}'
238 trigger-on: '{obj:gerrit_merge_triggers}'
240 - project-compare-type: ANT
241 project-pattern: '{project}'
243 - branch-compare-type: ANT
244 branch-pattern: '**/{branch}'
247 - shell: !include-raw-escape: ../shell/gerrit-branch-lock.sh
257 - lf_jjb_deploy_job: &lf_jjb_deploy_job
258 name: lf-jjb-deploy-job
260 ######################
261 # Default parameters #
262 ######################
265 git-url: '$GIT_URL/$GERRIT_PROJECT'
267 gerrit_jjb_deploy_job_triggers:
268 - comment-added-contains-event:
269 comment-contains-value: jjb-deploy (?!\*+$).+$
271 #####################
272 # Job Configuration #
273 #####################
275 project-type: freestyle
280 - lf-infra-properties:
282 build-days-to-keep: 1
285 - lf-infra-parameters:
289 lftools-version: '{lftools-version}'
294 jenkins-ssh-credential: '{jenkins-ssh-credential}'
298 pip-packages: jenkins-job-builder
299 - lf-infra-jjbini-sandbox
300 - shell: !include-raw-escape: ../shell/jjb-deploy-job.sh
306 name: '{project-name}-jjb-deploy-job'
307 id: gerrit-jjb-deploy-job
308 <<: *lf_jjb_deploy_job
311 - lf-infra-gerrit-scm:
313 refspec: 'refs/heads/{branch}'
315 submodule-recursive: true
316 choosing-strategy: default
317 jenkins-ssh-credential: '{jenkins-ssh-credential}'
321 server-name: '{gerrit-server-name}'
322 trigger-on: '{obj:gerrit_jjb_deploy_job_triggers}'
324 - project-compare-type: ANT
325 project-pattern: '{project}'
327 - branch-compare-type: ANT
328 branch-pattern: '**/{branch}'
331 name: '{project-name}-jjb-deploy-job'
332 id: github-jjb-deploy-job
333 <<: *lf_jjb_deploy_job
337 url: '{git-url}/{github-org}/{project}'
340 - lf-infra-github-scm:
341 url: '{git-clone-url}{github-org}/{project}'
342 refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
344 submodule-recursive: true
345 choosing-strategy: default
346 jenkins-ssh-credential: '{jenkins-ssh-credential}'
349 - lf-infra-github-pr-trigger:
350 trigger-phrase: '^jjb-deploy (?!\*+$).+$'
351 only-trigger-phrase: true
352 status-context: 'JJB Deploy Job'
358 github_pr_admin_list:
365 - lf_jjb_merge: &lf_jjb_merge
368 ######################
369 # Default parameters #
370 ######################
372 gerrit_merge_triggers:
373 - change-merged-event
374 - comment-added-contains-event:
375 comment-contains-value: remerge$
377 #####################
378 # Job Configuration #
379 #####################
383 - shell: !include-raw-escape:
384 - ../shell/jjb-install.sh
385 - ../shell/jjb-merge-job.sh
388 name: '{project-name}-jjb-merge'
391 # yamllint disable-line rule:key-duplicates
394 git-url: '$GIT_URL/$GERRIT_PROJECT'
397 - lf-infra-gerrit-scm:
401 submodule-recursive: '{submodule-recursive}'
402 choosing-strategy: default
403 jenkins-ssh-credential: '{jenkins-ssh-credential}'
407 server-name: '{gerrit-server-name}'
408 trigger-on: '{obj:gerrit_merge_triggers}'
410 - project-compare-type: ANT
411 project-pattern: '{project}'
413 - branch-compare-type: ANT
414 branch-pattern: '**/{branch}'
415 file-paths: '{obj:gerrit_trigger_file_paths}'
418 name: '{project-name}-jjb-merge'
421 # yamllint disable-line rule:key-duplicates
426 url: '{git-url}/{github-org}/{project}'
429 - lf-infra-github-scm:
430 url: '{git-clone-url}{github-org}/{project}'
433 submodule-recursive: '{submodule-recursive}'
434 choosing-strategy: default
435 jenkins-ssh-credential: '{jenkins-ssh-credential}'
441 - lf-infra-github-pr-trigger:
442 trigger-phrase: '^remerge$'
443 only-trigger-phrase: true
444 status-context: 'JJB Merge'
447 github-org: '{github-org}'
448 github_pr_whitelist: '{obj:github_pr_whitelist}'
449 github_pr_admin_list: '{obj:github_pr_admin_list}'
455 - lf_jjb_verify: &lf_jjb_verify
458 ######################
459 # Default parameters #
460 ######################
462 gerrit_verify_triggers:
463 - patchset-created-event:
465 exclude-trivial-rebase: false
466 exclude-no-code-change: false
467 - draft-published-event
468 - comment-added-contains-event:
469 comment-contains-value: recheck$
471 #####################
472 # Job Configuration #
473 #####################
479 - shell: !include-raw-escape:
480 - ../shell/git-validate-jira-urls.sh
481 - ../shell/jjb-install.sh
482 - ../shell/jjb-verify-job.sh
483 - ../shell/jjb-check-unicode.sh
484 - lf-infra-gpg-verify-git-signature
487 name: '{project-name}-jjb-verify'
488 id: gerrit-jjb-verify
490 # yamllint disable-line rule:key-duplicates
493 git-url: '$GIT_URL/$GERRIT_PROJECT'
496 - lf-infra-gerrit-scm:
498 refspec: '$GERRIT_REFSPEC'
499 branch: '$GERRIT_BRANCH'
500 submodule-recursive: '{submodule-recursive}'
501 choosing-strategy: gerrit
502 jenkins-ssh-credential: '{jenkins-ssh-credential}'
506 server-name: '{gerrit-server-name}'
507 trigger-on: '{obj:gerrit_verify_triggers}'
509 - project-compare-type: ANT
510 project-pattern: '{project}'
512 - branch-compare-type: ANT
513 branch-pattern: '**/{branch}'
514 file-paths: '{obj:gerrit_trigger_file_paths}'
517 name: '{project-name}-jjb-verify'
518 id: github-jjb-verify
520 # yamllint disable-line rule:key-duplicates
525 url: '{git-url}/{github-org}/{project}'
528 - lf-infra-github-scm:
529 url: '{git-clone-url}{github-org}/{project}'
530 refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
532 submodule-recursive: '{submodule-recursive}'
533 choosing-strategy: default
534 jenkins-ssh-credential: '{jenkins-ssh-credential}'
537 - lf-infra-github-pr-trigger:
538 trigger-phrase: '^recheck$'
539 only-trigger-phrase: false
540 status-context: 'JJB Verify'
546 github_pr_admin_list:
553 - lf_packer_merge: &lf_packer_merge
554 name: lf-packer-merge
556 ######################
557 # Default parameters #
558 ######################
560 gerrit_merge_triggers:
561 - change-merged-event
562 - comment-added-contains-event:
563 comment-contains-value: remerge$
565 #####################
566 # Job Configuration #
567 #####################
570 - lf-infra-packer-validate:
571 packer-cloud-settings: '{packer-cloud-settings}'
572 packer-version: '{packer-version}'
573 - lf-infra-packer-build:
574 packer-cloud-settings: '{packer-cloud-settings}'
575 packer-version: '{packer-version}'
576 platform: '{platforms}'
577 template: '{templates}'
580 name: '{project-name}-packer-merge-{platforms}-{templates}'
581 id: gerrit-packer-merge
582 <<: *lf_packer_common
583 # yamllint disable-line rule:key-duplicates
586 git-url: '$GIT_URL/$GERRIT_PROJECT'
589 - lf-infra-gerrit-scm:
591 refspec: '$GERRIT_REFSPEC'
592 branch: '$GERRIT_BRANCH'
593 submodule-recursive: '{submodule-recursive}'
594 choosing-strategy: gerrit
595 jenkins-ssh-credential: '{jenkins-ssh-credential}'
598 - timed: '00 10 1 * *'
600 server-name: '{gerrit-server-name}'
601 trigger-on: '{obj:gerrit_merge_triggers}'
603 - project-compare-type: ANT
604 project-pattern: '{project}'
606 - branch-compare-type: ANT
607 branch-pattern: '**/{branch}'
608 <<: *lf_packer_file_paths
611 name: '{project-name}-packer-merge-{platforms}-{templates}'
612 id: github-packer-merge
613 <<: *lf_packer_common
614 # yamllint disable-line rule:key-duplicates
619 url: '{git-url}/{github-org}/{project}'
622 - lf-infra-github-scm:
623 url: '{git-clone-url}{github-org}/{project}'
626 submodule-recursive: '{submodule-recursive}'
627 choosing-strategy: default
628 jenkins-ssh-credential: '{jenkins-ssh-credential}'
631 - timed: '00 10 1 * *'
635 - lf-infra-github-pr-trigger:
636 trigger-phrase: '^remerge$'
637 only-trigger-phrase: true
638 status-context: 'Packer {platforms}-${templates} Merge'
641 github-org: '{github-org}'
642 github_pr_whitelist: '{obj:github_pr_whitelist}'
643 github_pr_admin_list: '{obj:github_pr_admin_list}'
649 - lf_packer_verify: &lf_packer_verify
650 name: lf-packer-verify
652 ######################
653 # Default parameters #
654 ######################
658 gerrit_verify_triggers:
659 - patchset-created-event:
661 exclude-trivial-rebase: false
662 exclude-no-code-change: false
663 - draft-published-event
664 - comment-added-contains-event:
665 comment-contains-value: recheck$
667 gerrit_trigger_file_paths:
669 pattern: 'packer/vars/**.json'
671 pattern: 'packer/templates/**.json'
673 pattern: 'packer/provision/**.sh'
675 pattern: 'packer/provision/lib/**'
677 #####################
678 # Job Configuration #
679 #####################
684 - lf-infra-packer-validate:
685 packer-cloud-settings: '{packer-cloud-settings}'
686 packer-version: '{packer-version}'
689 name: '{project-name}-packer-verify'
690 id: gerrit-packer-verify
691 <<: *lf_packer_common
692 # yamllint disable-line rule:key-duplicates
693 <<: *lf_packer_verify
695 git-url: '$GIT_URL/$GERRIT_PROJECT'
698 - lf-infra-gerrit-scm:
700 refspec: '$GERRIT_REFSPEC'
701 branch: '$GERRIT_BRANCH'
702 submodule-recursive: '{submodule-recursive}'
703 choosing-strategy: gerrit
704 jenkins-ssh-credential: '{jenkins-ssh-credential}'
708 server-name: '{gerrit-server-name}'
709 trigger-on: '{obj:gerrit_verify_triggers}'
711 - project-compare-type: ANT
712 project-pattern: '{project}'
714 - branch-compare-type: ANT
715 branch-pattern: '**/{branch}'
716 file-paths: '{obj:gerrit_trigger_file_paths}'
719 name: '{project-name}-packer-verify'
720 id: github-packer-verify
721 <<: *lf_packer_common
722 # yamllint disable-line rule:key-duplicates
723 <<: *lf_packer_verify
727 url: '{git-url}/{github-org}/{project}'
730 - lf-infra-github-scm:
731 url: '{git-clone-url}{github-org}/{project}'
732 refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
734 submodule-recursive: '{submodule-recursive}'
735 choosing-strategy: default
736 jenkins-ssh-credential: '{jenkins-ssh-credential}'
739 - lf-infra-github-pr-trigger:
740 trigger-phrase: '^recheck$'
741 only-trigger-phrase: false
742 status-context: 'Packer Verify'
748 github_pr_admin_list: