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
62 pattern: 'packer/vars/{platforms}.json'
64 pattern: 'packer/templates/{templates}.json'
66 pattern: 'packer/provision/*.sh'
68 pattern: 'packer/provision/{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 ######################
83 submodule-recursive: true
84 packer-cloud-settings: packer-cloud-env
90 project-type: freestyle
94 - lf-infra-properties:
99 - lf-infra-parameters:
103 lftools-version: '{lftools-version}'
104 - lf-infra-packer-parameters:
105 packer-version: '{packer-version}'
109 build-timeout: '{build-timeout}'
110 jenkins-ssh-credential: '{jenkins-ssh-credential}'
116 name: lf-infra-jjb-parameters
120 default: '{jjb-version}'
121 description: Jenkins Job Builder version to download and install.
124 name: lf-infra-packer-parameters
128 default: '{packer-version}'
129 description: Packer version to download and install.
131 - lf_jjb_common: &lf_jjb_common
134 ######################
135 # Default parameters #
136 ######################
142 submodule-recursive: true
144 gerrit_trigger_file_paths:
150 pattern: '**/global-jjb'
152 #####################
153 # Job Configuration #
154 #####################
156 project-type: freestyle
160 - lf-infra-properties:
162 build-days-to-keep: 7
165 - lf-infra-parameters:
169 lftools-version: '{lftools-version}'
170 - lf-infra-jjb-parameters:
171 jjb-version: '{jjb-version}'
175 build-timeout: '{build-timeout}'
176 jenkins-ssh-credential: '{jenkins-ssh-credential}'
181 ######################
182 # Gerrit Branch Lock #
183 ######################
186 name: '{project-name}-gerrit-branch-lock-{stream}'
187 id: gerrit-branch-lock
189 ######################
190 # Default parameters #
191 ######################
194 git-url: '$GIT_URL/$GERRIT_PROJECT'
196 gerrit_merge_triggers:
197 - comment-added-contains-event:
198 comment-contains-value: (un)?lock branch$
200 #####################
201 # Job Configuration #
202 #####################
204 project-type: freestyle
208 - lf-infra-properties:
210 build-days-to-keep: 1
213 - lf-infra-parameters:
217 lftools-version: '{lftools-version}'
222 jenkins-ssh-credential: '{jenkins-ssh-credential}'
225 - lf-infra-gerrit-scm:
229 submodule-recursive: false
230 choosing-strategy: default
231 jenkins-ssh-credential: '{jenkins-ssh-credential}'
235 server-name: '{gerrit-server-name}'
236 trigger-on: '{obj:gerrit_merge_triggers}'
238 - project-compare-type: ANT
239 project-pattern: '{project}'
241 - branch-compare-type: ANT
242 branch-pattern: '**/{branch}'
245 - shell: !include-raw-escape: ../shell/gerrit-branch-lock.sh
255 - lf_jjb_deploy_job: &lf_jjb_deploy_job
256 name: lf-jjb-deploy-job
258 ######################
259 # Default parameters #
260 ######################
263 git-url: '$GIT_URL/$GERRIT_PROJECT'
265 gerrit_jjb_deploy_job_triggers:
266 - comment-added-contains-event:
267 comment-contains-value: jjb-deploy (?!\*+$).+$
269 #####################
270 # Job Configuration #
271 #####################
273 project-type: freestyle
278 - lf-infra-properties:
280 build-days-to-keep: 1
283 - lf-infra-parameters:
287 lftools-version: '{lftools-version}'
292 jenkins-ssh-credential: '{jenkins-ssh-credential}'
296 pip-packages: jenkins-job-builder
297 - lf-infra-jjbini-sandbox
298 - shell: !include-raw-escape: ../shell/jjb-deploy-job.sh
304 name: '{project-name}-jjb-deploy-job'
305 id: gerrit-jjb-deploy-job
306 <<: *lf_jjb_deploy_job
309 - lf-infra-gerrit-scm:
311 refspec: 'refs/heads/{branch}'
313 submodule-recursive: true
314 choosing-strategy: default
315 jenkins-ssh-credential: '{jenkins-ssh-credential}'
319 server-name: '{gerrit-server-name}'
320 trigger-on: '{obj:gerrit_jjb_deploy_job_triggers}'
322 - project-compare-type: ANT
323 project-pattern: '{project}'
325 - branch-compare-type: ANT
326 branch-pattern: '**/{branch}'
329 name: '{project-name}-jjb-deploy-job'
330 id: github-jjb-deploy-job
331 <<: *lf_jjb_deploy_job
335 url: '{git-url}/{github-org}/{project}'
338 - lf-infra-github-scm:
339 url: '{git-clone-url}{github-org}/{project}'
340 refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
342 submodule-recursive: true
343 choosing-strategy: default
344 jenkins-ssh-credential: '{jenkins-ssh-credential}'
347 - lf-infra-github-pr-trigger:
348 trigger-phrase: '^jjb-deploy (?!\*+$).+$'
349 only-trigger-phrase: true
350 status-context: 'JJB Deploy Job'
356 github_pr_admin_list:
363 - lf_jjb_merge: &lf_jjb_merge
366 ######################
367 # Default parameters #
368 ######################
370 gerrit_merge_triggers:
371 - change-merged-event
372 - comment-added-contains-event:
373 comment-contains-value: remerge$
375 #####################
376 # Job Configuration #
377 #####################
381 - shell: !include-raw-escape:
382 - ../shell/jjb-install.sh
383 - ../shell/jjb-merge-job.sh
386 name: '{project-name}-jjb-merge'
389 # yamllint disable-line rule:key-duplicates
392 git-url: '$GIT_URL/$GERRIT_PROJECT'
395 - lf-infra-gerrit-scm:
399 submodule-recursive: '{submodule-recursive}'
400 choosing-strategy: default
401 jenkins-ssh-credential: '{jenkins-ssh-credential}'
405 server-name: '{gerrit-server-name}'
406 trigger-on: '{obj:gerrit_merge_triggers}'
408 - project-compare-type: ANT
409 project-pattern: '{project}'
411 - branch-compare-type: ANT
412 branch-pattern: '**/{branch}'
413 file-paths: '{obj:gerrit_trigger_file_paths}'
416 name: '{project-name}-jjb-merge'
419 # yamllint disable-line rule:key-duplicates
424 url: '{git-url}/{github-org}/{project}'
427 - lf-infra-github-scm:
428 url: '{git-clone-url}{github-org}/{project}'
430 branch: 'refs/heads/{branch}'
431 submodule-recursive: '{submodule-recursive}'
432 choosing-strategy: default
433 jenkins-ssh-credential: '{jenkins-ssh-credential}'
439 - lf-infra-github-pr-trigger:
440 trigger-phrase: '^remerge$'
441 only-trigger-phrase: true
442 status-context: 'JJB Merge'
445 github-org: '{github-org}'
446 github_pr_whitelist: '{obj:github_pr_whitelist}'
447 github_pr_admin_list: '{obj:github_pr_admin_list}'
453 - lf_jjb_verify: &lf_jjb_verify
456 ######################
457 # Default parameters #
458 ######################
460 gerrit_verify_triggers:
461 - patchset-created-event:
463 exclude-trivial-rebase: false
464 exclude-no-code-change: false
465 - draft-published-event
466 - comment-added-contains-event:
467 comment-contains-value: recheck$
469 #####################
470 # Job Configuration #
471 #####################
477 - shell: !include-raw-escape:
478 - ../shell/git-validate-jira-urls.sh
479 - ../shell/jjb-install.sh
480 - ../shell/jjb-verify-job.sh
481 - ../shell/jjb-check-unicode.sh
482 - lf-infra-gpg-verify-git-signature
485 name: '{project-name}-jjb-verify'
486 id: gerrit-jjb-verify
488 # yamllint disable-line rule:key-duplicates
491 git-url: '$GIT_URL/$GERRIT_PROJECT'
494 - lf-infra-gerrit-scm:
496 refspec: '$GERRIT_REFSPEC'
497 branch: '$GERRIT_BRANCH'
498 submodule-recursive: '{submodule-recursive}'
499 choosing-strategy: gerrit
500 jenkins-ssh-credential: '{jenkins-ssh-credential}'
504 server-name: '{gerrit-server-name}'
505 trigger-on: '{obj:gerrit_verify_triggers}'
507 - project-compare-type: ANT
508 project-pattern: '{project}'
510 - branch-compare-type: ANT
511 branch-pattern: '**/{branch}'
512 file-paths: '{obj:gerrit_trigger_file_paths}'
515 name: '{project-name}-jjb-verify'
516 id: github-jjb-verify
518 # yamllint disable-line rule:key-duplicates
523 url: '{git-url}/{github-org}/{project}'
526 - lf-infra-github-scm:
527 url: '{git-clone-url}{github-org}/{project}'
528 refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
530 submodule-recursive: '{submodule-recursive}'
531 choosing-strategy: default
532 jenkins-ssh-credential: '{jenkins-ssh-credential}'
535 - lf-infra-github-pr-trigger:
536 trigger-phrase: '^recheck$'
537 only-trigger-phrase: false
538 status-context: 'JJB Verify'
544 github_pr_admin_list:
551 - lf_packer_merge: &lf_packer_merge
552 name: lf-packer-merge
554 ######################
555 # Default parameters #
556 ######################
558 gerrit_merge_triggers:
559 - change-merged-event
560 - comment-added-contains-event:
561 comment-contains-value: remerge$
563 #####################
564 # Job Configuration #
565 #####################
568 - lf-infra-packer-validate:
569 packer-cloud-settings: '{packer-cloud-settings}'
570 packer-version: '{packer-version}'
571 - lf-infra-packer-build:
572 packer-cloud-settings: '{packer-cloud-settings}'
573 packer-version: '{packer-version}'
574 platform: '{platforms}'
575 template: '{templates}'
578 name: '{project-name}-packer-merge-{platforms}-{templates}'
579 id: gerrit-packer-merge
580 <<: *lf_packer_common
581 # yamllint disable-line rule:key-duplicates
584 git-url: '$GIT_URL/$GERRIT_PROJECT'
587 - lf-infra-gerrit-scm:
589 refspec: '$GERRIT_REFSPEC'
590 branch: '$GERRIT_BRANCH'
591 submodule-recursive: '{submodule-recursive}'
592 choosing-strategy: gerrit
593 jenkins-ssh-credential: '{jenkins-ssh-credential}'
596 - timed: '00 10 1 * *'
598 server-name: '{gerrit-server-name}'
599 trigger-on: '{obj:gerrit_merge_triggers}'
601 - project-compare-type: ANT
602 project-pattern: '{project}'
604 - branch-compare-type: ANT
605 branch-pattern: '**/{branch}'
606 <<: *lf_packer_file_paths
609 name: '{project-name}-packer-merge-{platforms}-{templates}'
610 id: github-packer-merge
611 <<: *lf_packer_common
612 # yamllint disable-line rule:key-duplicates
617 url: '{git-url}/{github-org}/{project}'
620 - lf-infra-github-scm:
621 url: '{git-clone-url}{github-org}/{project}'
623 branch: 'refs/heads/{branch}'
624 submodule-recursive: '{submodule-recursive}'
625 choosing-strategy: default
626 jenkins-ssh-credential: '{jenkins-ssh-credential}'
629 - timed: '00 10 1 * *'
633 - lf-infra-github-pr-trigger:
634 trigger-phrase: '^remerge$'
635 only-trigger-phrase: true
636 status-context: 'Packer {platforms}-${templates} Merge'
639 github-org: '{github-org}'
640 github_pr_whitelist: '{obj:github_pr_whitelist}'
641 github_pr_admin_list: '{obj:github_pr_admin_list}'
647 - lf_packer_verify: &lf_packer_verify
648 name: lf-packer-verify
650 ######################
651 # Default parameters #
652 ######################
656 gerrit_verify_triggers:
657 - patchset-created-event:
659 exclude-trivial-rebase: false
660 exclude-no-code-change: false
661 - draft-published-event
662 - comment-added-contains-event:
663 comment-contains-value: recheck$
665 gerrit_trigger_file_paths:
667 pattern: 'packer/vars/**.json'
669 pattern: 'packer/templates/**.json'
671 pattern: 'packer/provision/**.sh'
673 pattern: 'packer/provision/lib/**'
675 #####################
676 # Job Configuration #
677 #####################
682 - lf-infra-packer-validate:
683 packer-cloud-settings: '{packer-cloud-settings}'
684 packer-version: '{packer-version}'
687 name: '{project-name}-packer-verify'
688 id: gerrit-packer-verify
689 <<: *lf_packer_common
690 # yamllint disable-line rule:key-duplicates
691 <<: *lf_packer_verify
693 git-url: '$GIT_URL/$GERRIT_PROJECT'
696 - lf-infra-gerrit-scm:
698 refspec: '$GERRIT_REFSPEC'
699 branch: '$GERRIT_BRANCH'
700 submodule-recursive: '{submodule-recursive}'
701 choosing-strategy: gerrit
702 jenkins-ssh-credential: '{jenkins-ssh-credential}'
706 server-name: '{gerrit-server-name}'
707 trigger-on: '{obj:gerrit_verify_triggers}'
709 - project-compare-type: ANT
710 project-pattern: '{project}'
712 - branch-compare-type: ANT
713 branch-pattern: '**/{branch}'
714 file-paths: '{obj:gerrit_trigger_file_paths}'
717 name: '{project-name}-packer-verify'
718 id: github-packer-verify
719 <<: *lf_packer_common
720 # yamllint disable-line rule:key-duplicates
721 <<: *lf_packer_verify
725 url: '{git-url}/{github-org}/{project}'
728 - lf-infra-github-scm:
729 url: '{git-clone-url}{github-org}/{project}'
730 refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
732 submodule-recursive: '{submodule-recursive}'
733 choosing-strategy: default
734 jenkins-ssh-credential: '{jenkins-ssh-credential}'
737 - lf-infra-github-pr-trigger:
738 trigger-phrase: '^recheck$'
739 only-trigger-phrase: false
740 status-context: 'Packer Verify'
746 github_pr_admin_list: