3 name: '{project-name}-ci-jobs'
6 - gerrit-jjb-deploy-job
11 name: '{project-name}-github-ci-jobs'
14 - github-jjb-deploy-job
19 name: '{project-name}-packer-jobs'
25 - gerrit-packer-verify
29 name: '{project-name}-github-packer-jobs'
35 - github-packer-verify
44 - config-file-provider:
47 target: '$HOME/.config/jenkins_jobs/jenkins_jobs.ini'
50 name: lf-infra-jjbini-sandbox
51 # TODO: Consolidate this into jjbini when JJB2.0 is available.
53 - config-file-provider:
55 - file-id: jjbini-sandbox
56 target: '$HOME/.config/jenkins_jobs/jenkins_jobs.ini'
58 - lf_packer_file_paths: &lf_packer_file_paths
59 name: lf-packer-file-paths
61 # Common files for all projects
63 pattern: 'packer/vars/{platforms}.json'
65 pattern: 'packer/templates/{templates}.json'
67 pattern: 'packer/provision/{templates}.sh'
69 pattern: 'packer/provision/lib/**'
71 - lf_packer: &lf_packer_common
72 name: lf-packer-common
73 # Provide configuration common in packer jobs.
75 ######################
76 # Default parameters #
77 ######################
82 submodule-recursive: true
83 packer-cloud-settings: packer-cloud-env
89 project-type: freestyle
93 - lf-infra-properties:
98 - lf-infra-parameters:
102 lftools-version: '{lftools-version}'
103 - lf-infra-packer-parameters:
104 packer-version: '{packer-version}'
108 build-timeout: '{build-timeout}'
109 jenkins-ssh-credential: '{jenkins-ssh-credential}'
115 name: lf-infra-jjb-parameters
119 default: '{jjb-version}'
120 description: Jenkins Job Builder version to download and install.
123 name: lf-infra-packer-parameters
127 default: '{packer-version}'
128 description: Packer version to download and install.
130 - lf_jjb_common: &lf_jjb_common
133 ######################
134 # Default parameters #
135 ######################
141 submodule-recursive: true
143 gerrit_trigger_file_paths:
149 pattern: '**/global-jjb'
151 #####################
152 # Job Configuration #
153 #####################
155 project-type: freestyle
159 - lf-infra-properties:
161 build-days-to-keep: 7
164 - lf-infra-parameters:
168 lftools-version: '{lftools-version}'
169 - lf-infra-jjb-parameters:
170 jjb-version: '{jjb-version}'
174 build-timeout: '{build-timeout}'
175 jenkins-ssh-credential: '{jenkins-ssh-credential}'
180 ######################
181 # Gerrit Branch Lock #
182 ######################
185 name: '{project-name}-gerrit-branch-lock-{stream}'
186 id: gerrit-branch-lock
188 ######################
189 # Default parameters #
190 ######################
193 git-url: '$GIT_URL/$GERRIT_PROJECT'
195 gerrit_merge_triggers:
196 - comment-added-contains-event:
197 comment-contains-value: (un)?lock branch$
199 #####################
200 # Job Configuration #
201 #####################
203 project-type: freestyle
207 - lf-infra-properties:
209 build-days-to-keep: 1
212 - lf-infra-parameters:
216 lftools-version: '{lftools-version}'
221 jenkins-ssh-credential: '{jenkins-ssh-credential}'
224 - lf-infra-gerrit-scm:
228 submodule-recursive: false
229 choosing-strategy: default
230 jenkins-ssh-credential: '{jenkins-ssh-credential}'
234 server-name: '{gerrit-server-name}'
235 trigger-on: '{obj:gerrit_merge_triggers}'
237 - project-compare-type: ANT
238 project-pattern: '{project}'
240 - branch-compare-type: ANT
241 branch-pattern: '**/{branch}'
244 - shell: !include-raw-escape: ../shell/gerrit-branch-lock.sh
254 - lf_jjb_deploy_job: &lf_jjb_deploy_job
255 name: lf-jjb-deploy-job
257 ######################
258 # Default parameters #
259 ######################
262 git-url: '$GIT_URL/$GERRIT_PROJECT'
264 gerrit_jjb_deploy_job_triggers:
265 - comment-added-contains-event:
266 comment-contains-value: jjb-deploy (?!\*+$).+$
268 #####################
269 # Job Configuration #
270 #####################
272 project-type: freestyle
277 - lf-infra-properties:
279 build-days-to-keep: 1
282 - lf-infra-parameters:
286 lftools-version: '{lftools-version}'
291 jenkins-ssh-credential: '{jenkins-ssh-credential}'
295 pip-packages: jenkins-job-builder
296 - lf-infra-jjbini-sandbox
297 - shell: !include-raw-escape: ../shell/jjb-deploy-job.sh
303 name: '{project-name}-jjb-deploy-job'
304 id: gerrit-jjb-deploy-job
305 <<: *lf_jjb_deploy_job
308 - lf-infra-gerrit-scm:
310 refspec: 'refs/heads/{branch}'
312 submodule-recursive: true
313 choosing-strategy: default
314 jenkins-ssh-credential: '{jenkins-ssh-credential}'
318 server-name: '{gerrit-server-name}'
319 trigger-on: '{obj:gerrit_jjb_deploy_job_triggers}'
321 - project-compare-type: ANT
322 project-pattern: '{project}'
324 - branch-compare-type: ANT
325 branch-pattern: '**/{branch}'
328 name: '{project-name}-jjb-deploy-job'
329 id: github-jjb-deploy-job
330 <<: *lf_jjb_deploy_job
334 url: '{git-url}/{github-org}/{project}'
337 - lf-infra-github-scm:
338 url: '{git-clone-url}{github-org}/{project}'
339 refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
341 submodule-recursive: true
342 choosing-strategy: default
343 jenkins-ssh-credential: '{jenkins-ssh-credential}'
346 - lf-infra-github-pr-trigger:
347 trigger-phrase: '^jjb-deploy (?!\*+$).+$'
348 only-trigger-phrase: true
349 status-context: 'JJB Deploy Job'
355 github_pr_admin_list:
362 - lf_jjb_merge: &lf_jjb_merge
365 ######################
366 # Default parameters #
367 ######################
369 gerrit_merge_triggers:
370 - change-merged-event
371 - comment-added-contains-event:
372 comment-contains-value: remerge$
374 #####################
375 # Job Configuration #
376 #####################
380 - shell: !include-raw-escape:
381 - ../shell/jjb-install.sh
382 - ../shell/jjb-merge-job.sh
385 name: '{project-name}-jjb-merge'
388 # yamllint disable-line rule:key-duplicates
391 git-url: '$GIT_URL/$GERRIT_PROJECT'
394 - lf-infra-gerrit-scm:
398 submodule-recursive: '{submodule-recursive}'
399 choosing-strategy: default
400 jenkins-ssh-credential: '{jenkins-ssh-credential}'
404 server-name: '{gerrit-server-name}'
405 trigger-on: '{obj:gerrit_merge_triggers}'
407 - project-compare-type: ANT
408 project-pattern: '{project}'
410 - branch-compare-type: ANT
411 branch-pattern: '**/{branch}'
412 file-paths: '{obj:gerrit_trigger_file_paths}'
415 name: '{project-name}-jjb-merge'
418 # yamllint disable-line rule:key-duplicates
423 url: '{git-url}/{github-org}/{project}'
426 - lf-infra-github-scm:
427 url: '{git-clone-url}{github-org}/{project}'
430 submodule-recursive: '{submodule-recursive}'
431 choosing-strategy: default
432 jenkins-ssh-credential: '{jenkins-ssh-credential}'
438 - lf-infra-github-pr-trigger:
439 trigger-phrase: '^remerge$'
440 only-trigger-phrase: true
441 status-context: 'JJB Merge'
444 github-org: '{github-org}'
445 github_pr_whitelist: '{obj:github_pr_whitelist}'
446 github_pr_admin_list: '{obj:github_pr_admin_list}'
452 - lf_jjb_verify: &lf_jjb_verify
455 ######################
456 # Default parameters #
457 ######################
459 gerrit_verify_triggers:
460 - patchset-created-event:
462 exclude-trivial-rebase: false
463 exclude-no-code-change: false
464 - draft-published-event
465 - comment-added-contains-event:
466 comment-contains-value: recheck$
468 #####################
469 # Job Configuration #
470 #####################
476 - shell: !include-raw-escape:
477 - ../shell/git-validate-jira-urls.sh
478 - ../shell/jjb-install.sh
479 - ../shell/jjb-verify-job.sh
480 - ../shell/jjb-check-unicode.sh
481 - lf-infra-gpg-verify-git-signature
484 name: '{project-name}-jjb-verify'
485 id: gerrit-jjb-verify
487 # yamllint disable-line rule:key-duplicates
490 git-url: '$GIT_URL/$GERRIT_PROJECT'
493 - lf-infra-gerrit-scm:
495 refspec: '$GERRIT_REFSPEC'
496 branch: '$GERRIT_BRANCH'
497 submodule-recursive: '{submodule-recursive}'
498 choosing-strategy: gerrit
499 jenkins-ssh-credential: '{jenkins-ssh-credential}'
503 server-name: '{gerrit-server-name}'
504 trigger-on: '{obj:gerrit_verify_triggers}'
506 - project-compare-type: ANT
507 project-pattern: '{project}'
509 - branch-compare-type: ANT
510 branch-pattern: '**/{branch}'
511 file-paths: '{obj:gerrit_trigger_file_paths}'
514 name: '{project-name}-jjb-verify'
515 id: github-jjb-verify
517 # yamllint disable-line rule:key-duplicates
522 url: '{git-url}/{github-org}/{project}'
525 - lf-infra-github-scm:
526 url: '{git-clone-url}{github-org}/{project}'
527 refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
529 submodule-recursive: '{submodule-recursive}'
530 choosing-strategy: default
531 jenkins-ssh-credential: '{jenkins-ssh-credential}'
534 - lf-infra-github-pr-trigger:
535 trigger-phrase: '^recheck$'
536 only-trigger-phrase: false
537 status-context: 'JJB Verify'
543 github_pr_admin_list:
550 - lf_packer_merge: &lf_packer_merge
551 name: lf-packer-merge
553 ######################
554 # Default parameters #
555 ######################
557 gerrit_merge_triggers:
558 - change-merged-event
559 - comment-added-contains-event:
560 comment-contains-value: remerge$
562 #####################
563 # Job Configuration #
564 #####################
567 - lf-infra-packer-validate:
568 packer-cloud-settings: '{packer-cloud-settings}'
569 packer-version: '{packer-version}'
570 - lf-infra-packer-build:
571 packer-cloud-settings: '{packer-cloud-settings}'
572 packer-version: '{packer-version}'
573 platform: '{platforms}'
574 template: '{templates}'
577 name: '{project-name}-packer-merge-{platforms}-{templates}'
578 id: gerrit-packer-merge
579 <<: *lf_packer_common
580 # yamllint disable-line rule:key-duplicates
583 git-url: '$GIT_URL/$GERRIT_PROJECT'
586 - lf-infra-gerrit-scm:
588 refspec: '$GERRIT_REFSPEC'
589 branch: '$GERRIT_BRANCH'
590 submodule-recursive: '{submodule-recursive}'
591 choosing-strategy: gerrit
592 jenkins-ssh-credential: '{jenkins-ssh-credential}'
595 - timed: '00 10 1 * *'
597 server-name: '{gerrit-server-name}'
598 trigger-on: '{obj:gerrit_merge_triggers}'
600 - project-compare-type: ANT
601 project-pattern: '{project}'
603 - branch-compare-type: ANT
604 branch-pattern: '**/{branch}'
605 <<: *lf_packer_file_paths
608 name: '{project-name}-packer-merge-{platforms}-{templates}'
609 id: github-packer-merge
610 <<: *lf_packer_common
611 # yamllint disable-line rule:key-duplicates
616 url: '{git-url}/{github-org}/{project}'
619 - lf-infra-github-scm:
620 url: '{git-clone-url}{github-org}/{project}'
623 submodule-recursive: '{submodule-recursive}'
624 choosing-strategy: default
625 jenkins-ssh-credential: '{jenkins-ssh-credential}'
628 - timed: '00 10 1 * *'
632 - lf-infra-github-pr-trigger:
633 trigger-phrase: '^remerge$'
634 only-trigger-phrase: true
635 status-context: 'Packer {platforms}-${templates} Merge'
638 github-org: '{github-org}'
639 github_pr_whitelist: '{obj:github_pr_whitelist}'
640 github_pr_admin_list: '{obj:github_pr_admin_list}'
646 - lf_packer_verify: &lf_packer_verify
647 name: lf-packer-verify
649 ######################
650 # Default parameters #
651 ######################
655 gerrit_verify_triggers:
656 - patchset-created-event:
658 exclude-trivial-rebase: false
659 exclude-no-code-change: false
660 - draft-published-event
661 - comment-added-contains-event:
662 comment-contains-value: recheck$
664 gerrit_trigger_file_paths:
666 pattern: 'packer/vars/**.json'
668 pattern: 'packer/templates/**.json'
670 pattern: 'packer/provision/**.sh'
672 pattern: 'packer/provision/lib/**'
674 #####################
675 # Job Configuration #
676 #####################
681 - lf-infra-packer-validate:
682 packer-cloud-settings: '{packer-cloud-settings}'
683 packer-version: '{packer-version}'
686 name: '{project-name}-packer-verify'
687 id: gerrit-packer-verify
688 <<: *lf_packer_common
689 # yamllint disable-line rule:key-duplicates
690 <<: *lf_packer_verify
692 git-url: '$GIT_URL/$GERRIT_PROJECT'
695 - lf-infra-gerrit-scm:
697 refspec: '$GERRIT_REFSPEC'
698 branch: '$GERRIT_BRANCH'
699 submodule-recursive: '{submodule-recursive}'
700 choosing-strategy: gerrit
701 jenkins-ssh-credential: '{jenkins-ssh-credential}'
705 server-name: '{gerrit-server-name}'
706 trigger-on: '{obj:gerrit_verify_triggers}'
708 - project-compare-type: ANT
709 project-pattern: '{project}'
711 - branch-compare-type: ANT
712 branch-pattern: '**/{branch}'
713 file-paths: '{obj:gerrit_trigger_file_paths}'
716 name: '{project-name}-packer-verify'
717 id: github-packer-verify
718 <<: *lf_packer_common
719 # yamllint disable-line rule:key-duplicates
720 <<: *lf_packer_verify
724 url: '{git-url}/{github-org}/{project}'
727 - lf-infra-github-scm:
728 url: '{git-clone-url}{github-org}/{project}'
729 refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
731 submodule-recursive: '{submodule-recursive}'
732 choosing-strategy: default
733 jenkins-ssh-credential: '{jenkins-ssh-credential}'
736 - lf-infra-github-pr-trigger:
737 trigger-phrase: '^recheck$'
738 only-trigger-phrase: false
739 status-context: 'Packer Verify'
745 github_pr_admin_list: