2 # This file contains job templates for Maven projects.
12 properties-content: "MAVEN_GOALS={mvn-goals}"
13 - shell: !include-raw-escape:
14 - ../shell/common-variables.sh
15 - ../shell/maven-build.sh
20 - shell: !include-raw:
21 - ../shell/common-variables.sh
22 - ../shell/maven-deploy.sh
25 name: lf-maven-versions-plugin
28 condition-kind: boolean-expression
29 condition-expression: "{maven-versions-plugin}"
32 properties-file: "{version-properties-file}"
34 maven-version: "{mvn-version}"
36 goals: "versions:set versions:update-child-modules versions:commit -B"
38 - "newVersion=${{release_version}}"
39 settings: "{mvn-settings}"
41 global-settings: "global-settings"
42 global-settings-type: cfp
47 - lf-provide-maven-settings:
48 global-settings-file: "{mvn-global-settings}"
49 settings-file: "{mvn-settings}"
50 - lf-infra-create-netrc:
51 server-id: "{mvn-staging-id}"
52 # include-raw-escape fails due to JJB bug
53 - shell: !include-raw-escape:
54 - ../shell/common-variables.sh
55 - ../shell/maven-stage.sh
56 - lf-provide-maven-settings-cleanup
59 name: lf-update-java-alternatives
62 # Work around inject plugin overriding our GIT_URL variable incorrectly
63 # https://issues.jenkins-ci.org/browse/JENKINS-49775
65 SET_JDK_VERSION={java-version}
67 - shell: !include-raw-escape: ../shell/update-java-alternatives.sh
69 properties-file: "/tmp/java.env"
75 - _lf_maven_common: &lf_maven_common
78 ######################
79 # Default parameters #
80 ######################
85 **/target/**/feature.xml
86 **/target/failsafe-reports/failsafe-summary.xml
87 **/target/surefire-reports/*-output.txt
93 project-type: freestyle
97 - lf-infra-properties:
98 build-days-to-keep: "{build-days-to-keep}"
101 - lf-infra-parameters:
105 - lf-infra-maven-parameters:
106 mvn-opts: "{mvn-opts}"
107 mvn-params: "{mvn-params}"
108 mvn-version: "{mvn-version}"
110 name: ARCHIVE_ARTIFACTS
111 default: "{archive-artifacts}"
112 description: Artifacts to archive to the logs server.
116 build-timeout: "{build-timeout}"
117 jenkins-ssh-credential: "{jenkins-ssh-credential}"
120 # TODO: Make email notification work.
121 # - lf-infra-email-notify:
122 # email-recipients: '{email-recipients}'
123 # email-prefix: '[releng]'
130 - _lf_maven_clm: &lf_maven_clm
133 ######################
134 # Default parameters #
135 ######################
138 build-days-to-keep: 30 # 30 days for troubleshooting purposes
141 git-url: "$GIT_URL/$PROJECT"
142 github-url: "https://github.com"
143 java-version: openjdk11
144 mvn-global-settings: global-settings
145 mvn-goals: clean install
149 nexus-iq-namespace: "" # Recommend a trailing dash when set. Example: odl-
150 nexus-iq-stage: "build"
152 submodule-recursive: true
153 submodule-timeout: 10
154 submodule-disable: false
156 nexus_iq_scan_patterns:
164 - comment-added-contains-event:
165 comment-contains-value: '^Patch Set\s+\d+:\s+run-clm\s*$'
168 - lf-infra-parameters:
172 - lf-infra-maven-parameters:
173 mvn-opts: "{mvn-opts}"
174 mvn-params: "{mvn-params}"
175 mvn-version: "{mvn-version}"
177 name: ARCHIVE_ARTIFACTS
178 default: "{archive-artifacts}"
179 description: Artifacts to archive to the logs server.
181 nexus-iq-stage: "{nexus-iq-stage}"
183 #####################
184 # Job Configuration #
185 #####################
187 disabled: "{disable-job}"
192 mvn-version: "{mvn-version}"
193 - lf-update-java-alternatives:
194 java-version: "{java-version}"
195 - lf-provide-maven-settings:
196 global-settings-file: "{mvn-global-settings}"
197 settings-file: "{mvn-settings}"
198 - lf-infra-sonatype-clm:
199 mvn-goals: "{mvn-goals}"
200 - lf-provide-maven-settings-cleanup
201 - shell: 'find . -regex ".*karaf/target" | xargs rm -rf'
202 - nexus-iq-policy-evaluator:
203 stage: "{nexus-iq-stage}"
204 application-type: "manual"
205 application-id: "{nexus-iq-namespace}{project-name}"
206 scan-patterns: "{obj:nexus_iq_scan_patterns}"
207 fail-build-network-error: true
210 name: lf-infra-sonatype-clm
211 # Run a CLM scan build with Maven
214 properties-content: |
215 MAVEN_GOALS={mvn-goals}
216 - shell: !include-raw-escape:
217 - ../shell/common-variables.sh
218 - ../shell/sonatype-clm.sh
221 name: "{project-name}-maven-clm-{stream}"
224 # yamllint disable-line rule:key-duplicates
228 - lf-infra-gerrit-scm:
229 jenkins-ssh-credential: "{jenkins-ssh-credential}"
231 refspec: "$GERRIT_REFSPEC"
232 branch: "$GERRIT_BRANCH"
233 submodule-recursive: "{submodule-recursive}"
234 submodule-timeout: "{submodule-timeout}"
235 submodule-disable: "{submodule-disable}"
236 choosing-strategy: default
239 # Build weekly on Saturdays
242 server-name: "{gerrit-server-name}"
243 trigger-on: "{obj:gerrit_clm_triggers}"
245 - project-compare-type: ANT
246 project-pattern: "{project}"
248 - branch-compare-type: ANT
249 branch-pattern: "**/{branch}"
257 name: "{project-name}-maven-clm-{stream}"
260 # yamllint disable-line rule:key-duplicates
264 - lf-infra-properties:
265 build-days-to-keep: "{build-days-to-keep}"
267 url: "{github-url}/{github-org}/{project}"
270 - lf-infra-github-scm:
271 url: "{git-clone-url}{github-org}/{project}"
273 branch: "refs/heads/{branch}"
274 submodule-recursive: "{submodule-recursive}"
275 submodule-timeout: "{submodule-timeout}"
276 submodule-disable: "{submodule-disable}"
277 choosing-strategy: default
278 jenkins-ssh-credential: "{jenkins-ssh-credential}"
281 # Build weekly on Saturdays
283 - github-pull-request:
284 trigger-phrase: "^run-clm$"
285 only-trigger-phrase: true
286 status-context: "CLM"
291 white-list: "{obj:github_pr_allowlist}"
292 admin-list: "{obj:github_pr_admin_list}"
293 white-list-target-branches:
300 - _lf_maven_snyk_cli: &lf_maven_snyk_cli
301 name: lf-maven-snyk_cli
303 ######################
304 # Default parameters #
305 ######################
308 build-days-to-keep: 30 # 30 days for troubleshooting purposes
311 git-url: "$GIT_URL/$PROJECT"
312 github-url: "https://github.com"
313 java-version: openjdk11
314 mvn-global-settings: global-settings
315 mvn-goals: clean install
320 snyk-token-credential-id: snyk-token
321 snyk-org-credential-id: snyk-org
323 submodule-recursive: true
324 submodule-timeout: 10
325 submodule-disable: false
327 gerrit_snyk_triggers:
328 - comment-added-contains-event:
329 comment-contains-value: '^Patch Set\s+\d+:\s+run-snyk\s*$'
332 - lf-infra-parameters:
336 - lf-infra-maven-parameters:
337 mvn-opts: "{mvn-opts}"
338 mvn-params: "{mvn-params}"
339 mvn-version: "{mvn-version}"
341 name: SNYK_CLI_OPTIONS
342 default: "{snyk-cli-options}"
343 description: Additional Snyk CLI commands and options
345 name: ARCHIVE_ARTIFACTS
346 default: "{archive-artifacts}"
347 description: Artifacts to archive to the logs server.
350 - credentials-binding:
352 credential-id: "{snyk-token-credential-id}"
355 credential-id: "{snyk-org-credential-id}"
358 #####################
359 # Job Configuration #
360 #####################
362 disabled: "{disable-job}"
367 mvn-version: "{mvn-version}"
368 - lf-update-java-alternatives:
369 java-version: "{java-version}"
370 - lf-provide-maven-settings:
371 global-settings-file: "{mvn-global-settings}"
372 settings-file: "{mvn-settings}"
374 mvn-goals: "{mvn-goals}"
375 - lf-infra-snyk-cli-scanner
376 - lf-provide-maven-settings-cleanup
377 - shell: 'find . -regex ".*karaf/target" | xargs rm -rf'
380 name: lf-infra-snyk-cli-scanner
381 # Download and run the Snyk CLI scanner
383 - shell: !include-raw-escape:
384 - ../shell/snyk-cli-scanner-run.sh
387 name: "{project-name}-maven-snyk-cli-{stream}"
388 id: gerrit-maven-snyk-cli
390 # yamllint disable-line rule:key-duplicates
391 <<: *lf_maven_snyk_cli
394 - lf-infra-gerrit-scm:
395 jenkins-ssh-credential: "{jenkins-ssh-credential}"
397 refspec: "$GERRIT_REFSPEC"
398 branch: "$GERRIT_BRANCH"
399 submodule-recursive: "{submodule-recursive}"
400 submodule-timeout: "{submodule-timeout}"
401 submodule-disable: "{submodule-disable}"
402 choosing-strategy: default
405 # Build weekly on Saturdays
408 server-name: "{gerrit-server-name}"
409 trigger-on: "{obj:gerrit_snyk_triggers}"
411 - project-compare-type: ANT
412 project-pattern: "{project}"
414 - branch-compare-type: ANT
415 branch-pattern: "**/{branch}"
423 name: "{project-name}-maven-snyk-cli-{stream}"
424 id: github-maven-snyk-cli
426 # yamllint disable-line rule:key-duplicates
427 <<: *lf_maven_snyk_cli
430 - lf-infra-properties:
431 build-days-to-keep: "{build-days-to-keep}"
433 url: "{github-url}/{github-org}/{project}"
436 - lf-infra-github-scm:
437 url: "{git-clone-url}{github-org}/{project}"
439 branch: "refs/heads/{branch}"
440 submodule-recursive: "{submodule-recursive}"
441 submodule-timeout: "{submodule-timeout}"
442 submodule-disable: "{submodule-disable}"
443 choosing-strategy: default
444 jenkins-ssh-credential: "{jenkins-ssh-credential}"
447 # Build weekly on Saturdays
449 - github-pull-request:
450 trigger-phrase: "^run-snyk$"
451 only-trigger-phrase: true
452 status-context: "SNYK scan"
457 white-list: "{obj:github_pr_allowlist}"
458 admin-list: "{obj:github_pr_admin_list}"
459 white-list-target-branches:
462 #########################
463 # Maven Javadoc Publish #
464 #########################
466 - _lf_maven_javadoc_publish: &lf_maven_javadoc_publish
467 name: lf-maven-javadoc-publish
469 ######################
470 # Default parameters #
471 ######################
474 build-days-to-keep: 30 # 30 days in case a release takes long to get approved.
477 git-url: "$GIT_URL/$PROJECT"
478 github-url: "https://github.com"
479 java-version: openjdk11
481 mvn-global-settings: global-settings
486 submodule-recursive: true
487 submodule-timeout: 10
488 submodule-disable: false
490 gerrit_merge_triggers:
491 - change-merged-event
492 - comment-added-contains-event:
493 comment-contains-value: '^Patch Set\s+\d+:\s+remerge\s*$'
495 #####################
496 # Job Configuration #
497 #####################
499 disabled: "{disable-job}"
504 mvn-version: "{mvn-version}"
505 - lf-update-java-alternatives:
506 java-version: "{java-version}"
507 - lf-provide-maven-settings:
508 global-settings-file: "{mvn-global-settings}"
509 settings-file: "{mvn-settings}"
510 - lf-infra-create-netrc:
511 server-id: "{mvn-site-id}"
513 properties-content: |
514 DEPLOY_PATH={javadoc-path}
516 - shell: !include-raw-escape:
517 - ../shell/common-variables.sh
518 - ../shell/maven-javadoc-generate.sh
519 - ../shell/maven-javadoc-publish.sh
520 - lf-provide-maven-settings-cleanup
523 name: "{project-name}-maven-javadoc-publish-{stream}-{java-version}"
524 id: gerrit-maven-javadoc-publish
526 # yamllint disable-line rule:key-duplicates
527 <<: *lf_maven_javadoc_publish
529 git-url: "$GIT_URL/$GERRIT_PROJECT"
532 - lf-infra-gerrit-scm:
536 submodule-recursive: "{submodule-recursive}"
537 submodule-timeout: "{submodule-timeout}"
538 submodule-disable: "{submodule-disable}"
539 choosing-strategy: default
540 jenkins-ssh-credential: "{jenkins-ssh-credential}"
544 server-name: "{gerrit-server-name}"
545 trigger-on: "{obj:gerrit_merge_triggers}"
547 - project-compare-type: ANT
548 project-pattern: "{project}"
550 - branch-compare-type: ANT
551 branch-pattern: "**/{branch}"
554 name: "{project-name}-maven-javadoc-publish-{stream}-{java-version}"
555 id: github-maven-javadoc-publish
557 # yamllint disable-line rule:key-duplicates
558 <<: *lf_maven_javadoc_publish
561 - lf-infra-properties:
562 build-days-to-keep: "{build-days-to-keep}"
564 url: "{github-url}/{github-org}/{project}"
567 - lf-infra-github-scm:
568 url: "{git-clone-url}{github-org}/{project}"
571 submodule-recursive: "{submodule-recursive}"
572 submodule-timeout: "{submodule-timeout}"
573 submodule-disable: "{submodule-disable}"
574 choosing-strategy: default
575 jenkins-ssh-credential: "{jenkins-ssh-credential}"
581 - github-pull-request:
582 trigger-phrase: "^remerge$"
583 only-trigger-phrase: true
584 status-context: "Maven Javadoc Publish"
589 white-list: "{obj:github_pr_allowlist}"
590 admin-list: "{obj:github_pr_admin_list}"
591 white-list-target-branches:
594 ########################
595 # Maven Javadoc Verify #
596 ########################
598 - _lf_maven_javadoc_verify: &lf_maven_javadoc_verify
599 name: lf-maven-javadoc-verify
601 ######################
602 # Default parameters #
603 ######################
606 build-days-to-keep: 30 # 30 days in case a release takes long to get approved.
609 git-url: "$GIT_URL/$PROJECT"
610 github-url: "https://github.com"
611 java-version: openjdk11
613 mvn-global-settings: global-settings
618 submodule-recursive: true
619 submodule-timeout: 10
620 submodule-disable: false
622 gerrit_verify_triggers:
623 - patchset-created-event:
625 exclude-trivial-rebase: false
626 exclude-no-code-change: false
627 - draft-published-event
628 - comment-added-contains-event:
629 comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
631 #####################
632 # Job Configuration #
633 #####################
636 disabled: "{disable-job}"
641 mvn-version: "{mvn-version}"
642 - lf-update-java-alternatives:
643 java-version: "{java-version}"
644 - lf-provide-maven-settings:
645 global-settings-file: "{mvn-global-settings}"
646 settings-file: "{mvn-settings}"
648 properties-content: |
650 - shell: !include-raw-escape:
651 - ../shell/common-variables.sh
652 - ../shell/maven-javadoc-generate.sh
653 - lf-provide-maven-settings-cleanup
656 name: "{project-name}-maven-javadoc-verify-{stream}-{java-version}"
657 id: gerrit-maven-javadoc-verify
659 # yamllint disable-line rule:key-duplicates
660 <<: *lf_maven_javadoc_verify
663 - lf-infra-gerrit-scm:
664 jenkins-ssh-credential: "{jenkins-ssh-credential}"
666 refspec: "$GERRIT_REFSPEC"
667 branch: "$GERRIT_BRANCH"
668 submodule-recursive: "{submodule-recursive}"
669 submodule-timeout: "{submodule-timeout}"
670 submodule-disable: "{submodule-disable}"
671 choosing-strategy: gerrit
675 server-name: "{gerrit-server-name}"
676 trigger-on: "{obj:gerrit_verify_triggers}"
678 - project-compare-type: ANT
679 project-pattern: "{project}"
681 - branch-compare-type: ANT
682 branch-pattern: "**/{branch}"
685 name: "{project-name}-maven-javadoc-verify-{stream}-{java-version}"
686 id: github-maven-javadoc-verify
688 # yamllint disable-line rule:key-duplicates
689 <<: *lf_maven_javadoc_verify
692 - lf-infra-properties:
693 build-days-to-keep: "{build-days-to-keep}"
695 url: "{github-url}/{github-org}/{project}"
698 - lf-infra-github-scm:
699 url: "{git-clone-url}{github-org}/{project}"
700 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
702 submodule-recursive: "{submodule-recursive}"
703 submodule-timeout: "{submodule-timeout}"
704 submodule-disable: "{submodule-disable}"
705 choosing-strategy: default
706 jenkins-ssh-credential: "{jenkins-ssh-credential}"
709 - github-pull-request:
710 trigger-phrase: ^(recheck|reverify)$
711 only-trigger-phrase: false
712 status-context: "Maven Javadoc Verify"
715 white-list-target-branches:
722 - _lf_maven_merge: &lf_maven_merge
725 ######################
726 # Default parameters #
727 ######################
730 build-days-to-keep: 30 # 30 days in case we need to troubleshoot
734 git-url: "$GIT_URL/$PROJECT"
735 github-url: "https://github.com"
736 jacoco-exclude-pattern: "**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**"
737 java-version: openjdk11
738 mvn-global-settings: global-settings
739 mvn-goals: clean deploy
741 mvn-params: "-Dmerge"
743 nexus-cut-dirs: 6 # Number of dirs in the Nexus path to remove for wget -r.
744 pre-build-script: "# pre-build script goes here"
745 post-build-script: "# post-build script goes here"
747 submodule-recursive: true
748 submodule-timeout: 10
749 submodule-disable: false
751 gerrit_merge_triggers:
752 - change-merged-event
753 - comment-added-contains-event:
754 comment-contains-value: '^Patch Set\s+\d+:\s+remerge\s*$'
756 gerrit_trigger_file_paths:
757 - compare-type: REG_EXP
760 # github_included_regions MUST match gerrit_trigger_file_paths
761 github_included_regions:
764 post_build_trigger: ""
766 #####################
767 # Job Configuration #
768 #####################
770 disabled: "{disable-job}"
774 - lf-jacoco-nojava-workaround
776 mvn-version: "{mvn-version}"
777 - lf-update-java-alternatives:
778 java-version: "{java-version}"
779 - lf-provide-maven-settings:
780 global-settings-file: "{mvn-global-settings}"
781 settings-file: "{mvn-settings}"
782 - lf-infra-create-netrc:
783 server-id: "{mvn-snapshot-id}"
785 properties-content: |
786 NEXUS_CUT_DIRS={nexus-cut-dirs}
787 NEXUS_REPO={nexus-snapshot-repo}
788 - shell: !include-raw-escape: ../shell/maven-fetch-metadata.sh
789 - shell: "{pre-build-script}"
791 mvn-goals: "{mvn-goals}"
792 - shell: "{post-build-script}"
794 - lf-provide-maven-settings-cleanup
799 exclude-pattern: "{jacoco-exclude-pattern}"
801 - trigger-parameterized-builds: "{obj:post_build_trigger}"
804 name: "{project-name}-maven-merge-{stream}"
805 id: gerrit-maven-merge
807 # yamllint disable-line rule:key-duplicates
811 - lf-infra-gerrit-scm:
812 jenkins-ssh-credential: "{jenkins-ssh-credential}"
814 refspec: "$GERRIT_REFSPEC"
815 branch: "$GERRIT_BRANCH"
816 submodule-recursive: "{submodule-recursive}"
817 submodule-timeout: "{submodule-timeout}"
818 submodule-disable: "{submodule-disable}"
819 choosing-strategy: default
822 - timed: "{obj:cron}"
824 server-name: "{gerrit-server-name}"
825 trigger-on: "{obj:gerrit_merge_triggers}"
827 - project-compare-type: ANT
828 project-pattern: "{project}"
830 - branch-compare-type: ANT
831 branch-pattern: "**/{branch}"
832 file-paths: "{obj:gerrit_trigger_file_paths}"
835 name: "{project-name}-maven-merge-{stream}"
836 id: github-maven-merge
838 # yamllint disable-line rule:key-duplicates
842 - lf-infra-properties:
843 build-days-to-keep: "{build-days-to-keep}"
845 url: "{github-url}/{github-org}/{project}"
848 - lf-infra-github-scm:
849 url: "{git-clone-url}{github-org}/{project}"
851 branch: "refs/heads/{branch}"
852 submodule-recursive: "{submodule-recursive}"
853 submodule-timeout: "{submodule-timeout}"
854 submodule-disable: "{submodule-disable}"
855 choosing-strategy: default
856 jenkins-ssh-credential: "{jenkins-ssh-credential}"
859 - timed: "{obj:cron}"
863 - github-pull-request:
864 trigger-phrase: "^remerge$"
865 only-trigger-phrase: true
866 status-context: "Maven Merge"
871 white-list: "{obj:github_pr_allowlist}"
872 admin-list: "{obj:github_pr_admin_list}"
873 white-list-target-branches:
875 included-regions: "{obj:github_included_regions}"
877 ##########################
878 # Maven Merge for Docker #
879 ##########################
881 - _lf_maven_docker_merge: &lf_maven_docker_merge
882 name: lf-maven-docker-merge
886 - lf-jacoco-nojava-workaround
888 mvn-version: "{mvn-version}"
889 - lf-infra-docker-login:
890 global-settings-file: "{mvn-global-settings}"
891 settings-file: "{mvn-settings}"
892 - lf-update-java-alternatives:
893 java-version: "{java-version}"
894 # must provide maven settings AFTER docker due to its cleanup
895 - lf-provide-maven-settings:
896 global-settings-file: "{mvn-global-settings}"
897 settings-file: "{mvn-settings}"
898 - lf-infra-create-netrc:
899 server-id: "{mvn-snapshot-id}"
901 properties-content: |
902 NEXUS_CUT_DIRS={nexus-cut-dirs}
903 NEXUS_REPO={nexus-snapshot-repo}
904 CONTAINER_PULL_REGISTRY={container-public-registry}
905 CONTAINER_PUSH_REGISTRY={container-snapshot-registry}
906 - shell: !include-raw-escape: ../shell/maven-fetch-metadata.sh
908 mvn-goals: "{mvn-goals}"
910 - lf-provide-maven-settings-cleanup
913 name: "{project-name}-maven-docker-merge-{stream}"
914 id: gerrit-maven-docker-merge
916 # yamllint disable-line rule:key-duplicates
918 # yamllint disable-line rule:key-duplicates
919 <<: *lf_maven_docker_merge
922 - lf-infra-gerrit-scm:
923 jenkins-ssh-credential: "{jenkins-ssh-credential}"
925 refspec: "$GERRIT_REFSPEC"
926 branch: "$GERRIT_BRANCH"
927 submodule-recursive: "{submodule-recursive}"
928 submodule-timeout: "{submodule-timeout}"
929 submodule-disable: "{submodule-disable}"
930 choosing-strategy: default
934 server-name: "{gerrit-server-name}"
935 trigger-on: "{obj:gerrit_merge_triggers}"
937 - project-compare-type: ANT
938 project-pattern: "{project}"
940 - branch-compare-type: ANT
941 branch-pattern: "**/{branch}"
942 file-paths: "{obj:gerrit_trigger_file_paths}"
945 name: "{project-name}-maven-docker-merge-{stream}"
946 id: github-maven-docker-merge
948 # yamllint disable-line rule:key-duplicates
950 # yamllint disable-line rule:key-duplicates
951 <<: *lf_maven_docker_merge
954 - lf-infra-properties:
955 build-days-to-keep: "{build-days-to-keep}"
957 url: "{github-url}/{github-org}/{project}"
960 - lf-infra-github-scm:
961 url: "{git-clone-url}{github-org}/{project}"
963 branch: "refs/heads/{branch}"
964 submodule-recursive: "{submodule-recursive}"
965 submodule-timeout: "{submodule-timeout}"
966 submodule-disable: "{submodule-disable}"
967 choosing-strategy: default
968 jenkins-ssh-credential: "{jenkins-ssh-credential}"
974 - github-pull-request:
975 trigger-phrase: "^remerge$"
976 only-trigger-phrase: true
977 status-context: "Maven Docker Merge"
982 white-list: "{obj:github_pr_allowlist}"
983 admin-list: "{obj:github_pr_admin_list}"
984 white-list-target-branches:
986 included-regions: "{obj:github_included_regions}"
992 - _lf_maven_stage: &lf_maven_stage
995 ######################
996 # Default parameters #
997 ######################
1000 build-days-to-keep: 30 # 30 days in case a release takes long to get approved.
1004 git-url: "$GIT_URL/$PROJECT"
1005 github-url: "https://github.com"
1006 java-version: openjdk11
1007 maven-versions-plugin: false
1008 version-properties-file: version.properties
1010 mvn-global-settings: global-settings
1011 mvn-goals: clean deploy
1015 ossrh-profile-id: ""
1018 sbom-path: "$WORKSPACE"
1019 sbom-generator: false
1020 sbom-generator-version: "v0.0.15"
1021 sign-artifacts: false
1024 submodule-recursive: true
1025 submodule-timeout: 10
1026 submodule-disable: false
1028 gerrit_release_triggers:
1029 - comment-added-contains-event:
1030 comment-contains-value: '^Patch Set\s+\d+:\s+stage-(maven-)?release\s*$'
1032 gerrit_trigger_file_paths:
1036 # github_included_regions MUST match gerrit_trigger_file_paths
1037 github_included_regions:
1040 #####################
1041 # Job Configuration #
1042 #####################
1044 disabled: "{disable-job}"
1047 - lf-infra-parameters:
1048 project: "{project}"
1051 - lf-infra-maven-parameters:
1052 mvn-opts: "{mvn-opts}"
1053 mvn-params: "{mvn-params}"
1054 mvn-version: "{mvn-version}"
1055 staging-profile-id: "{staging-profile-id}"
1057 name: MAVEN_VERSIONS_PLUGIN
1058 default: "{maven-versions-plugin}"
1059 description: Use maven-versions-plugin to update pom versions.
1061 name: ARCHIVE_ARTIFACTS
1062 default: "{archive-artifacts}"
1063 description: Artifacts to archive to the logs server.
1065 name: STAGING_PROFILE_ID
1066 default: "{staging-profile-id}"
1067 description: Nexus staging profile ID.
1069 name: SBOM_GENERATOR_VERSION
1070 default: "{sbom-generator-version}"
1071 description: SBOM generator version to download and run.
1074 default: "{sbom-path}"
1075 description: path where SBOM needs to be executed.
1078 - lf-infra-pre-build
1079 - lf-jacoco-nojava-workaround
1081 mvn-version: "{mvn-version}"
1082 - lf-update-java-alternatives:
1083 java-version: "{java-version}"
1084 - lf-provide-maven-settings:
1085 global-settings-file: "{mvn-global-settings}"
1086 settings-file: "{mvn-settings}"
1087 - lf-maven-versions-plugin:
1088 maven-versions-plugin: "{maven-versions-plugin}"
1089 version-properties-file: "{version-properties-file}"
1090 mvn-version: "{mvn-version}"
1091 mvn-pom: "{mvn-pom}"
1092 mvn-settings: "{mvn-settings}"
1093 - shell: !include-raw-escape: ../shell/maven-patch-release.sh
1095 mvn-goals: "{mvn-goals}"
1096 # With SBOM Generator
1098 condition-kind: boolean-expression
1099 condition-expression: "{sbom-generator}"
1101 - shell: echo 'Running SBOM Generator'
1102 - lf-infra-maven-sbom-generator:
1103 sbom-flags: "{sbom-flags}"
1104 - lf-sigul-sign-dir:
1105 sign-artifacts: "{sign-artifacts}"
1106 sign-dir: "$WORKSPACE/m2repo"
1107 sign-mode: "{sign-mode}"
1109 mvn-global-settings: "{mvn-global-settings}"
1110 mvn-settings: "{mvn-settings}"
1111 mvn-staging-id: "{mvn-staging-id}"
1113 mvn-central: "{mvn-central}"
1114 mvn-global-settings: "{mvn-global-settings}"
1115 mvn-settings: "{mvn-settings}"
1116 ossrh-profile-id: "{ossrh-profile-id}"
1117 - lf-provide-maven-settings-cleanup
1120 name: "{project-name}-maven-stage-{stream}"
1121 id: gerrit-maven-stage
1122 <<: *lf_maven_common
1123 # yamllint disable-line rule:key-duplicates
1127 - lf-infra-gerrit-scm:
1128 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1129 git-url: "{git-url}"
1130 refspec: "$GERRIT_REFSPEC"
1131 branch: "$GERRIT_BRANCH"
1132 submodule-recursive: "{submodule-recursive}"
1133 submodule-timeout: "{submodule-timeout}"
1134 submodule-disable: "{submodule-disable}"
1135 choosing-strategy: default
1138 - timed: "{obj:cron}"
1140 server-name: "{gerrit-server-name}"
1141 trigger-on: "{obj:gerrit_release_triggers}"
1143 - project-compare-type: ANT
1144 project-pattern: "{project}"
1146 - branch-compare-type: ANT
1147 branch-pattern: "**/{branch}"
1148 file-paths: "{obj:gerrit_trigger_file_paths}"
1151 name: "{project-name}-maven-stage-{stream}"
1152 id: github-maven-stage
1153 <<: *lf_maven_common
1154 # yamllint disable-line rule:key-duplicates
1158 - lf-infra-properties:
1159 build-days-to-keep: "{build-days-to-keep}"
1161 url: "{github-url}/{github-org}/{project}"
1164 - lf-infra-github-scm:
1165 url: "{git-clone-url}{github-org}/{project}"
1166 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
1168 submodule-recursive: "{submodule-recursive}"
1169 submodule-timeout: "{submodule-timeout}"
1170 submodule-disable: "{submodule-disable}"
1171 choosing-strategy: default
1172 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1175 - timed: "{obj:cron}"
1176 - github-pull-request:
1177 trigger-phrase: "^stage-(maven-)?release$"
1178 only-trigger-phrase: true
1179 status-context: "Maven Release"
1182 white-list-target-branches:
1184 included-regions: "{obj:github_included_regions}"
1186 ##########################
1187 # Maven Stage for Docker #
1188 ##########################
1190 - _lf_maven_docker_stage: &lf_maven_docker_stage
1191 name: lf-maven-docker-stage
1194 - lf-infra-pre-build
1195 - lf-jacoco-nojava-workaround
1197 mvn-version: "{mvn-version}"
1198 - lf-update-java-alternatives:
1199 java-version: "{java-version}"
1200 - lf-infra-docker-login:
1201 global-settings-file: "{mvn-global-settings}"
1202 settings-file: "{mvn-settings}"
1203 # must provide maven settings AFTER docker-login due to its cleanup
1204 - lf-provide-maven-settings:
1205 global-settings-file: "{mvn-global-settings}"
1206 settings-file: "{mvn-settings}"
1207 - lf-maven-versions-plugin:
1208 maven-versions-plugin: "{maven-versions-plugin}"
1209 version-properties-file: "{version-properties-file}"
1210 mvn-version: "{mvn-version}"
1211 mvn-pom: "{mvn-pom}"
1212 mvn-settings: "{mvn-settings}"
1213 - shell: !include-raw-escape: ../shell/maven-patch-release.sh
1215 properties-content: |
1216 CONTAINER_PULL_REGISTRY={container-public-registry}
1217 CONTAINER_PUSH_REGISTRY={container-staging-registry}
1219 mvn-goals: "{mvn-goals}"
1220 - lf-sigul-sign-dir:
1221 sign-artifacts: "{sign-artifacts}"
1222 sign-dir: "$WORKSPACE/m2repo"
1223 sign-mode: "{sign-mode}"
1225 # NO lf-maven-central
1226 - lf-provide-maven-settings-cleanup
1228 gerrit_release_docker_triggers:
1229 - comment-added-contains-event:
1230 comment-contains-value: '^Patch Set\s+\d+:\s+stage-(docker-)?release\s*$'
1233 name: "{project-name}-maven-docker-stage-{stream}"
1234 id: gerrit-maven-docker-stage
1235 <<: *lf_maven_common
1236 # yamllint disable-line rule:key-duplicates
1238 # yamllint disable-line rule:key-duplicates
1239 <<: *lf_maven_docker_stage
1242 - lf-infra-gerrit-scm:
1243 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1244 git-url: "{git-url}"
1245 refspec: "$GERRIT_REFSPEC"
1246 branch: "$GERRIT_BRANCH"
1247 submodule-recursive: "{submodule-recursive}"
1248 submodule-timeout: "{submodule-timeout}"
1249 submodule-disable: "{submodule-disable}"
1250 choosing-strategy: default
1253 - timed: "{obj:cron}"
1255 server-name: "{gerrit-server-name}"
1256 trigger-on: "{obj:gerrit_release_docker_triggers}"
1258 - project-compare-type: ANT
1259 project-pattern: "{project}"
1261 - branch-compare-type: ANT
1262 branch-pattern: "**/{branch}"
1263 file-paths: "{obj:gerrit_trigger_file_paths}"
1266 name: "{project-name}-maven-docker-stage-{stream}"
1267 id: github-maven-docker-stage
1268 <<: *lf_maven_common
1269 # yamllint disable-line rule:key-duplicates
1271 # yamllint disable-line rule:key-duplicates
1272 <<: *lf_maven_docker_stage
1275 - lf-infra-properties:
1276 build-days-to-keep: "{build-days-to-keep}"
1278 url: "{github-url}/{github-org}/{project}"
1281 - lf-infra-github-scm:
1282 url: "{git-clone-url}{github-org}/{project}"
1283 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
1285 submodule-recursive: "{submodule-recursive}"
1286 submodule-timeout: "{submodule-timeout}"
1287 submodule-disable: "{submodule-disable}"
1288 choosing-strategy: default
1289 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1292 - timed: "{obj:cron}"
1293 - github-pull-request:
1294 trigger-phrase: "^stage-(docker-)?release$"
1295 only-trigger-phrase: true
1296 status-context: "Maven Release"
1299 white-list-target-branches:
1301 included-regions: "{obj:github_included_regions}"
1307 - _lf_maven_sonar: &lf_maven_sonar
1308 name: lf-maven-sonar
1310 ######################
1311 # Default parameters #
1312 ######################
1314 branch: master # Sonar should always be run on master branch
1315 build-days-to-keep: 7
1317 cron: "H H * * 6" # run weekly
1319 git-url: "$GIT_URL/$PROJECT"
1320 github-url: "https://github.com"
1321 jacoco-exclude-pattern: "**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**"
1322 java-version: openjdk11
1324 mvn-global-settings: global-settings
1325 mvn-goals: clean install
1329 sonar-mvn-goal: "sonar:sonar"
1331 sonarcloud-project-key: ""
1332 sonarcloud-project-organization: ""
1333 sonarcloud-api-token-cred-id: sonarcloud-api-token
1334 sonarcloud-qualitygate-wait: false
1335 # Projects not compatible with jdk17 can set java-version to something else
1336 sonarcloud-java-version: openjdk17
1338 submodule-recursive: true
1339 submodule-timeout: 10
1340 submodule-disable: false
1341 scan-dev-branch: false
1343 gerrit_sonar_triggers:
1344 - comment-added-contains-event:
1345 comment-contains-value: '^Patch Set\s+\d+:\s+run-sonar\s*$'
1347 #####################
1348 # Job Configuration #
1349 #####################
1351 disabled: "{disable-job}"
1354 - lf-infra-parameters:
1355 project: "{project}"
1358 - lf-infra-maven-parameters:
1359 mvn-opts: "{mvn-opts}"
1360 mvn-params: "{mvn-params}"
1361 mvn-version: "{mvn-version}"
1363 name: ARCHIVE_ARTIFACTS
1364 default: "{archive-artifacts}"
1365 description: Artifacts to archive to the logs server.
1368 default: "{java-opts}"
1370 Java options. Example: -Xmx1024m
1372 name: SONAR_MAVEN_GOAL
1373 default: "{sonar-mvn-goal}"
1375 Maven goals to pass to the Sonar call. Typically sonar:sonar
1376 however to use a specific version of the sonar-maven-plugin we
1377 can call "org.codehaus.mojo:sonar-maven-plugin:3.3.0.603:sonar".
1380 - credentials-binding:
1382 credential-id: "{sonarcloud-api-token-cred-id}"
1386 - timed: "{obj:cron}"
1388 server-name: "{gerrit-server-name}"
1389 trigger-on: "{obj:gerrit_sonar_triggers}"
1391 - project-compare-type: "ANT"
1392 project-pattern: "{project}"
1394 - branch-compare-type: "ANT"
1395 branch-pattern: "**/master"
1404 exclude-pattern: "{jacoco-exclude-pattern}"
1408 - _mvn_sonar_builders: &mvn_sonar_builders
1409 name: mvn-sonar-builders
1411 - lf-infra-pre-build
1414 condition-kind: boolean-expression
1415 condition-expression: "{sonarcloud}"
1417 - shell: echo 'Using SonarCloud'
1418 - lf-infra-maven-sonarcloud:
1419 java-version: "{java-version}"
1420 mvn-goals: "{mvn-goals}"
1421 mvn-settings: "{mvn-settings}"
1422 mvn-version: "{mvn-version}"
1423 sonarcloud-project-key: "{sonarcloud-project-key}"
1424 sonarcloud-project-organization: "{sonarcloud-project-organization}"
1425 sonarcloud-java-version: "{sonarcloud-java-version}"
1426 sonarcloud-qualitygate-wait: "{sonarcloud-qualitygate-wait}"
1427 scan-dev-branch: "{scan-dev-branch}"
1432 condition-kind: boolean-expression
1433 condition-expression: "{sonarcloud}"
1435 - shell: echo 'Using SonarQube'
1436 - lf-infra-maven-sonar:
1437 java-version: "{java-version}"
1438 mvn-goals: "{mvn-goals}"
1439 mvn-settings: "{mvn-settings}"
1440 mvn-version: "{mvn-version}"
1442 - _mvn_sonar_builders_prescan_script: &mvn_sonar_builders_prescan_script
1443 name: mvn-sonar-builders-prescan-script
1445 - shell: "{sonar-prescan-script}"
1446 - lf-infra-pre-build
1449 condition-kind: boolean-expression
1450 condition-expression: "{sonarcloud}"
1452 - shell: echo 'Using SonarCloud'
1453 - lf-infra-maven-sonarcloud:
1454 java-version: "{java-version}"
1455 mvn-goals: "{mvn-goals}"
1456 mvn-settings: "{mvn-settings}"
1457 mvn-version: "{mvn-version}"
1458 sonarcloud-project-key: "{sonarcloud-project-key}"
1459 sonarcloud-project-organization: "{sonarcloud-project-organization}"
1460 sonarcloud-java-version: "{sonarcloud-java-version}"
1461 sonarcloud-qualitygate-wait: "{sonarcloud-qualitygate-wait}"
1462 scan-dev-branch: "{scan-dev-branch}"
1467 condition-kind: boolean-expression
1468 condition-expression: "{sonarcloud}"
1470 - shell: echo 'Using SonarQube'
1471 - lf-infra-maven-sonar:
1472 java-version: "{java-version}"
1473 mvn-goals: "{mvn-goals}"
1474 mvn-settings: "{mvn-settings}"
1475 mvn-version: "{mvn-version}"
1478 name: lf-infra-maven-sbom-generator
1479 # Run Maven goals and trigger SPDX SBOM Generator tool
1482 properties-content: |
1483 SBOM_FLAGS={sbom-flags}
1484 - shell: !include-raw-escape:
1485 - ../shell/sbom-generator.sh
1488 name: lf-infra-maven-sonar
1489 # Run a Sonar build with Maven
1492 mvn-version: "{mvn-version}"
1493 - lf-update-java-alternatives:
1494 java-version: "{java-version}"
1496 # Switch this to the sonar wrapper when JJB 2.0 is available
1497 properties-content: |
1498 SONAR_HOST_URL=$SONAR_URL
1499 MAVEN_GOALS={mvn-goals}
1500 - lf-provide-maven-settings:
1501 global-settings-file: global-settings
1502 settings-file: "{mvn-settings}"
1503 - shell: !include-raw-escape:
1504 - ../shell/common-variables.sh
1505 - ../shell/maven-sonar.sh
1506 - lf-provide-maven-settings-cleanup
1509 name: lf-infra-maven-sonarcloud
1510 # Run a Sonar build with Maven
1513 mvn-version: "{mvn-version}"
1514 - lf-update-java-alternatives:
1515 java-version: "{java-version}"
1517 # Switch this to the sonar wrapper when JJB 2.0 is available
1518 properties-content: |
1519 SONAR_HOST_URL=https://sonarcloud.io
1520 PROJECT_KEY={sonarcloud-project-key}
1521 PROJECT_ORGANIZATION={sonarcloud-project-organization}
1522 MAVEN_GOALS={mvn-goals}
1523 SONARCLOUD_JAVA_VERSION={sonarcloud-java-version}
1524 SCAN_DEV_BRANCH={scan-dev-branch}
1525 SONARCLOUD_QUALITYGATE_WAIT={sonarcloud-qualitygate-wait}
1526 - lf-provide-maven-settings:
1527 global-settings-file: global-settings
1528 settings-file: "{mvn-settings}"
1529 - shell: !include-raw-escape:
1530 - ../shell/common-variables.sh
1531 - ../shell/maven-sonar.sh
1532 - lf-provide-maven-settings-cleanup
1535 name: "{project-name}-sonar"
1536 id: gerrit-maven-sonar
1537 <<: *lf_maven_common
1538 # yamllint disable-line rule:key-duplicates
1540 <<: *mvn_sonar_builders
1543 - lf-infra-gerrit-scm:
1544 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1545 git-url: "{git-url}"
1546 refspec: $GERRIT_REFSPEC
1547 branch: $GERRIT_BRANCH
1548 submodule-recursive: "{submodule-recursive}"
1549 submodule-timeout: "{submodule-timeout}"
1550 submodule-disable: "{submodule-disable}"
1551 choosing-strategy: default
1554 name: "{project-name}-sonar-verify"
1555 id: gerrit-maven-sonar-verify
1556 <<: *lf_maven_common
1557 # yamllint disable-line rule:key-duplicates
1559 <<: *mvn_sonar_builders
1562 scan-dev-branch: true
1563 sonarcloud-qualitygate-wait: false
1565 gerrit_sonar_triggers:
1566 - patchset-created-event:
1567 exclude-drafts: true
1568 exclude-trivial-rebase: false
1569 exclude-no-code-change: false
1570 - draft-published-event
1571 - comment-added-contains-event:
1572 comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
1574 gerrit_trigger_file_paths:
1575 - compare-type: REG_EXP
1580 server-name: "{gerrit-server-name}"
1581 trigger-on: "{obj:gerrit_sonar_triggers}"
1583 - project-compare-type: "ANT"
1584 project-pattern: "{project}"
1586 - branch-compare-type: "ANT"
1587 branch-pattern: "**/{branch}"
1588 file-paths: "{obj:gerrit_trigger_file_paths}"
1591 - lf-infra-gerrit-scm:
1592 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1593 git-url: "{git-url}"
1594 refspec: $GERRIT_REFSPEC
1595 branch: $GERRIT_BRANCH
1596 submodule-recursive: "{submodule-recursive}"
1597 submodule-timeout: "{submodule-timeout}"
1598 submodule-disable: "{submodule-disable}"
1599 choosing-strategy: gerrit
1602 name: "{project-name}-sonar-prescan-script"
1603 id: gerrit-maven-sonar-prescan-script
1604 <<: *lf_maven_common
1605 # yamllint disable-line rule:key-duplicates
1607 <<: *mvn_sonar_builders_prescan_script
1610 - lf-infra-gerrit-scm:
1611 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1612 git-url: "{git-url}"
1613 refspec: $GERRIT_REFSPEC
1614 branch: $GERRIT_BRANCH
1615 submodule-recursive: "{submodule-recursive}"
1616 submodule-timeout: "{submodule-timeout}"
1617 submodule-disable: "{submodule-disable}"
1618 choosing-strategy: default
1621 name: "{project-name}-sonar"
1622 id: github-maven-sonar
1623 <<: *lf_maven_common
1624 # yamllint disable-line rule:key-duplicates
1628 - lf-infra-properties:
1629 build-days-to-keep: "{build-days-to-keep}"
1631 url: "{github-url}/{github-org}/{project}"
1634 - lf-infra-github-scm:
1635 url: "{git-clone-url}{github-org}/{project}"
1636 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
1638 submodule-recursive: "{submodule-recursive}"
1639 submodule-timeout: "{submodule-timeout}"
1640 submodule-disable: "{submodule-disable}"
1641 choosing-strategy: default
1642 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1645 - timed: "{obj:cron}"
1646 - github-pull-request:
1647 trigger-phrase: "^run-sonar$"
1648 only-trigger-phrase: true
1649 status-context: "Maven Sonar"
1654 white-list: "{obj:github_pr_allowlist}"
1655 admin-list: "{obj:github_pr_admin_list}"
1656 white-list-target-branches:
1660 name: "{project-name}-sonar-prescan-script"
1661 id: github-maven-sonar-prescan-script
1662 <<: *lf_maven_common
1663 # yamllint disable-line rule:key-duplicates
1665 <<: *mvn_sonar_builders_prescan_script
1668 - lf-infra-properties:
1669 build-days-to-keep: "{build-days-to-keep}"
1671 url: "{github-url}/{github-org}/{project}"
1674 - lf-infra-github-scm:
1675 url: "{git-clone-url}{github-org}/{project}"
1676 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
1678 submodule-recursive: "{submodule-recursive}"
1679 submodule-timeout: "{submodule-timeout}"
1680 submodule-disable: "{submodule-disable}"
1681 choosing-strategy: default
1682 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1685 - timed: "{obj:cron}"
1686 - github-pull-request:
1687 trigger-phrase: "^run-sonar$"
1688 only-trigger-phrase: true
1689 status-context: "Maven Sonar"
1694 white-list: "{obj:github_pr_allowlist}"
1695 admin-list: "{obj:github_pr_admin_list}"
1696 white-list-target-branches:
1703 - _lf_maven_verify: &lf_maven_verify
1704 name: lf-maven-verify
1706 ######################
1707 # Default parameters #
1708 ######################
1711 build-days-to-keep: 7
1714 git-url: "$GIT_URL/$PROJECT"
1715 github-url: "https://github.com"
1716 jacoco-exclude-pattern: "**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**"
1717 java-version: openjdk11
1718 mvn-global-settings: global-settings
1719 mvn-goals: clean deploy
1721 mvn-params: "-Dstream=$STREAM -Dmaven.source.skip=true"
1723 pre-build-script: "# pre-build script goes here"
1724 post-build-script: "# post-build script goes here"
1726 submodule-recursive: true
1727 submodule-timeout: 10
1728 submodule-disable: false
1730 gerrit_verify_triggers:
1731 - patchset-created-event:
1732 exclude-drafts: true
1733 exclude-trivial-rebase: false
1734 exclude-no-code-change: false
1735 - draft-published-event
1736 - comment-added-contains-event:
1737 comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
1739 gerrit_trigger_file_paths:
1740 - compare-type: REG_EXP
1743 # github_included_regions MUST match gerrit_trigger_file_paths
1744 github_included_regions:
1747 #####################
1748 # Job Configuration #
1749 #####################
1752 disabled: "{disable-job}"
1755 - lf-infra-pre-build
1756 - lf-jacoco-nojava-workaround
1758 mvn-version: "{mvn-version}"
1759 - lf-update-java-alternatives:
1760 java-version: "{java-version}"
1761 - lf-provide-maven-settings:
1762 global-settings-file: "{mvn-global-settings}"
1763 settings-file: "{mvn-settings}"
1764 - shell: "{pre-build-script}"
1766 mvn-goals: "{mvn-goals}"
1767 - shell: "{post-build-script}"
1768 - lf-provide-maven-settings-cleanup
1773 exclude-pattern: "{jacoco-exclude-pattern}"
1777 name: "{project-name}-maven-verify-{stream}-{mvn-version}-{java-version}"
1778 id: gerrit-maven-verify
1779 <<: *lf_maven_common
1780 # yamllint disable-line rule:key-duplicates
1781 <<: *lf_maven_verify
1784 - lf-infra-gerrit-scm:
1785 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1786 git-url: "{git-url}"
1787 refspec: "$GERRIT_REFSPEC"
1788 branch: "$GERRIT_BRANCH"
1789 submodule-recursive: "{submodule-recursive}"
1790 submodule-timeout: "{submodule-timeout}"
1791 submodule-disable: "{submodule-disable}"
1792 choosing-strategy: gerrit
1796 server-name: "{gerrit-server-name}"
1797 trigger-on: "{obj:gerrit_verify_triggers}"
1799 - project-compare-type: ANT
1800 project-pattern: "{project}"
1802 - branch-compare-type: ANT
1803 branch-pattern: "**/{branch}"
1804 file-paths: "{obj:gerrit_trigger_file_paths}"
1807 name: "{project-name}-maven-verify-{stream}-{mvn-version}-{java-version}"
1808 id: github-maven-verify
1809 <<: *lf_maven_common
1810 # yamllint disable-line rule:key-duplicates
1811 <<: *lf_maven_verify
1814 - lf-infra-properties:
1815 build-days-to-keep: "{build-days-to-keep}"
1817 url: "{github-url}/{github-org}/{project}"
1820 - lf-infra-github-scm:
1821 url: "{git-clone-url}{github-org}/{project}"
1822 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
1824 submodule-recursive: "{submodule-recursive}"
1825 submodule-timeout: "{submodule-timeout}"
1826 submodule-disable: "{submodule-disable}"
1827 choosing-strategy: default
1828 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1831 - github-pull-request:
1832 trigger-phrase: "^(recheck|reverify)$"
1833 only-trigger-phrase: false
1834 status-context: "Maven Verify {mvn-version}-{java-version}"
1837 white-list-target-branches:
1839 included-regions: "{obj:github_included_regions}"
1841 ###########################
1842 # Maven Verify for Docker #
1843 ###########################
1845 - _lf_maven_docker_verify: &lf_maven_docker_verify
1846 name: lf-maven-docker-verify
1848 # image push not allowed during verification
1849 mvn-goals: clean install
1852 - lf-infra-pre-build
1853 - lf-jacoco-nojava-workaround
1855 mvn-version: "{mvn-version}"
1856 - lf-update-java-alternatives:
1857 java-version: "{java-version}"
1858 - lf-infra-docker-login:
1859 global-settings-file: "{mvn-global-settings}"
1860 settings-file: "{mvn-settings}"
1861 # must provide maven settings AFTER docker due to its cleanup
1862 - lf-provide-maven-settings:
1863 global-settings-file: "{mvn-global-settings}"
1864 settings-file: "{mvn-settings}"
1866 properties-content: |
1867 CONTAINER_PULL_REGISTRY={container-public-registry}
1869 mvn-goals: "{mvn-goals}"
1870 - lf-provide-maven-settings-cleanup
1873 name: "{project-name}-maven-docker-verify-{stream}-{mvn-version}-{java-version}"
1874 id: gerrit-maven-docker-verify
1875 <<: *lf_maven_common
1876 # yamllint disable-line rule:key-duplicates
1877 <<: *lf_maven_verify
1878 # yamllint disable-line rule:key-duplicates
1879 <<: *lf_maven_docker_verify
1882 - lf-infra-gerrit-scm:
1883 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1884 git-url: "{git-url}"
1885 refspec: "$GERRIT_REFSPEC"
1886 branch: "$GERRIT_BRANCH"
1887 submodule-recursive: "{submodule-recursive}"
1888 submodule-timeout: "{submodule-timeout}"
1889 submodule-disable: "{submodule-disable}"
1890 choosing-strategy: gerrit
1894 server-name: "{gerrit-server-name}"
1895 trigger-on: "{obj:gerrit_verify_triggers}"
1897 - project-compare-type: ANT
1898 project-pattern: "{project}"
1900 - branch-compare-type: ANT
1901 branch-pattern: "**/{branch}"
1902 file-paths: "{obj:gerrit_trigger_file_paths}"
1905 name: "{project-name}-maven-docker-verify-{stream}-{mvn-version}-{java-version}"
1906 id: github-maven-docker-verify
1907 <<: *lf_maven_common
1908 # yamllint disable-line rule:key-duplicates
1909 <<: *lf_maven_verify
1910 # yamllint disable-line rule:key-duplicates
1911 <<: *lf_maven_docker_verify
1914 - lf-infra-properties:
1915 build-days-to-keep: "{build-days-to-keep}"
1917 url: "{github-url}/{github-org}/{project}"
1920 - lf-infra-github-scm:
1921 url: "{git-clone-url}{github-org}/{project}"
1922 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
1924 submodule-recursive: "{submodule-recursive}"
1925 submodule-timeout: "{submodule-timeout}"
1926 submodule-disable: "{submodule-disable}"
1927 choosing-strategy: default
1928 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1931 - github-pull-request:
1932 trigger-phrase: "^(recheck|reverify)$"
1933 only-trigger-phrase: false
1934 status-context: "Maven Docker Verify {mvn-version}-{java-version}"
1937 white-list-target-branches:
1939 included-regions: "{obj:github_included_regions}"
1941 #############################
1942 # Maven Verify Dependencies #
1943 #############################
1945 - _lf_maven_verify_dependencies: &lf_maven_verify_dependencies
1946 name: lf-maven-verify-dependencies
1948 ######################
1949 # Default parameters #
1950 ######################
1953 build-days-to-keep: 7
1956 git-url: "$GIT_URL/$PROJECT"
1957 github-url: "https://github.com"
1958 jacoco-exclude-pattern: "**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**"
1959 java-version: openjdk11
1960 mvn-global-settings: global-settings
1961 mvn-goals: clean deploy
1963 mvn-params: "-Dstream=$STREAM"
1966 submodule-recursive: true
1967 submodule-timeout: 10
1968 submodule-disable: false
1970 gerrit_verify_triggers:
1971 - comment-added-contains-event:
1972 comment-contains-value: "recheck: [0-9 ]+"
1973 gerrit_trigger_file_paths:
1977 #####################
1978 # Job Configuration #
1979 #####################
1982 disabled: "{disable-job}"
1985 - lf-infra-pre-build
1986 - lf-jacoco-nojava-workaround
1988 mvn-version: "{mvn-version}"
1989 - lf-update-java-alternatives:
1990 java-version: "{java-version}"
1991 - lf-provide-maven-settings:
1992 global-settings-file: "{mvn-global-settings}"
1993 settings-file: "{mvn-settings}"
1994 - lf-fetch-dependent-patches
1995 - shell: !include-raw-escape:
1996 - ../shell/common-variables.sh
1997 - ../shell/maven-build-deps.sh
1999 mvn-goals: "{mvn-goals}"
2000 - lf-provide-maven-settings-cleanup
2005 exclude-pattern: "{jacoco-exclude-pattern}"
2009 name: "{project-name}-maven-verify-deps-{stream}-{mvn-version}-{java-version}"
2010 id: gerrit-maven-verify-dependencies
2011 <<: *lf_maven_common
2012 # yamllint disable-line rule:key-duplicates
2013 <<: *lf_maven_verify_dependencies
2016 - lf-infra-gerrit-scm:
2017 jenkins-ssh-credential: "{jenkins-ssh-credential}"
2018 git-url: "{git-url}"
2019 refspec: "$GERRIT_REFSPEC"
2020 branch: "$GERRIT_BRANCH"
2021 submodule-recursive: "{submodule-recursive}"
2022 submodule-timeout: "{submodule-timeout}"
2023 submodule-disable: "{submodule-disable}"
2024 choosing-strategy: gerrit
2028 server-name: "{gerrit-server-name}"
2029 trigger-on: "{obj:gerrit_verify_triggers}"
2031 - project-compare-type: ANT
2032 project-pattern: "{project}"
2034 - branch-compare-type: ANT
2035 branch-pattern: "**/{branch}"
2036 file-paths: "{obj:gerrit_trigger_file_paths}"
2037 comment-text-parameter-mode: PLAIN