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-escape:
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 # With SBOM Generator
1222 condition-kind: boolean-expression
1223 condition-expression: "{sbom-generator}"
1225 - shell: echo 'Running SBOM Generator'
1226 - lf-infra-maven-sbom-generator:
1227 sbom-flags: "{sbom-flags}"
1228 - lf-sigul-sign-dir:
1229 sign-artifacts: "{sign-artifacts}"
1230 sign-dir: "$WORKSPACE/m2repo"
1231 sign-mode: "{sign-mode}"
1233 # NO lf-maven-central
1234 - lf-provide-maven-settings-cleanup
1236 gerrit_release_docker_triggers:
1237 - comment-added-contains-event:
1238 comment-contains-value: '^Patch Set\s+\d+:\s+stage-(docker-)?release\s*$'
1241 name: "{project-name}-maven-docker-stage-{stream}"
1242 id: gerrit-maven-docker-stage
1243 <<: *lf_maven_common
1244 # yamllint disable-line rule:key-duplicates
1246 # yamllint disable-line rule:key-duplicates
1247 <<: *lf_maven_docker_stage
1250 - lf-infra-gerrit-scm:
1251 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1252 git-url: "{git-url}"
1253 refspec: "$GERRIT_REFSPEC"
1254 branch: "$GERRIT_BRANCH"
1255 submodule-recursive: "{submodule-recursive}"
1256 submodule-timeout: "{submodule-timeout}"
1257 submodule-disable: "{submodule-disable}"
1258 choosing-strategy: default
1261 - timed: "{obj:cron}"
1263 server-name: "{gerrit-server-name}"
1264 trigger-on: "{obj:gerrit_release_docker_triggers}"
1266 - project-compare-type: ANT
1267 project-pattern: "{project}"
1269 - branch-compare-type: ANT
1270 branch-pattern: "**/{branch}"
1271 file-paths: "{obj:gerrit_trigger_file_paths}"
1274 name: "{project-name}-maven-docker-stage-{stream}"
1275 id: github-maven-docker-stage
1276 <<: *lf_maven_common
1277 # yamllint disable-line rule:key-duplicates
1279 # yamllint disable-line rule:key-duplicates
1280 <<: *lf_maven_docker_stage
1283 - lf-infra-properties:
1284 build-days-to-keep: "{build-days-to-keep}"
1286 url: "{github-url}/{github-org}/{project}"
1289 - lf-infra-github-scm:
1290 url: "{git-clone-url}{github-org}/{project}"
1291 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
1293 submodule-recursive: "{submodule-recursive}"
1294 submodule-timeout: "{submodule-timeout}"
1295 submodule-disable: "{submodule-disable}"
1296 choosing-strategy: default
1297 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1300 - timed: "{obj:cron}"
1301 - github-pull-request:
1302 trigger-phrase: "^stage-(docker-)?release$"
1303 only-trigger-phrase: true
1304 status-context: "Maven Release"
1307 white-list-target-branches:
1309 included-regions: "{obj:github_included_regions}"
1315 - _lf_maven_sonar: &lf_maven_sonar
1316 name: lf-maven-sonar
1318 ######################
1319 # Default parameters #
1320 ######################
1322 branch: master # Sonar should always be run on master branch
1323 build-days-to-keep: 7
1325 cron: "H H * * 6" # run weekly
1327 git-url: "$GIT_URL/$PROJECT"
1328 github-url: "https://github.com"
1329 jacoco-exclude-pattern: "**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**"
1330 java-version: openjdk11
1332 mvn-global-settings: global-settings
1333 mvn-goals: clean install
1337 sonar-mvn-goal: "sonar:sonar"
1339 sonarcloud-project-key: ""
1340 sonarcloud-project-organization: ""
1341 sonarcloud-api-token-cred-id: sonarcloud-api-token
1342 sonarcloud-qualitygate-wait: false
1343 # Projects not compatible with jdk17 can set java-version to something else
1344 sonarcloud-java-version: openjdk17
1346 submodule-recursive: true
1347 submodule-timeout: 10
1348 submodule-disable: false
1349 scan-dev-branch: false
1351 gerrit_sonar_triggers:
1352 - comment-added-contains-event:
1353 comment-contains-value: '^Patch Set\s+\d+:\s+run-sonar\s*$'
1355 #####################
1356 # Job Configuration #
1357 #####################
1359 disabled: "{disable-job}"
1362 - lf-infra-parameters:
1363 project: "{project}"
1366 - lf-infra-maven-parameters:
1367 mvn-opts: "{mvn-opts}"
1368 mvn-params: "{mvn-params}"
1369 mvn-version: "{mvn-version}"
1371 name: ARCHIVE_ARTIFACTS
1372 default: "{archive-artifacts}"
1373 description: Artifacts to archive to the logs server.
1376 default: "{java-opts}"
1378 Java options. Example: -Xmx1024m
1380 name: SONAR_MAVEN_GOAL
1381 default: "{sonar-mvn-goal}"
1383 Maven goals to pass to the Sonar call. Typically sonar:sonar
1384 however to use a specific version of the sonar-maven-plugin we
1385 can call "org.codehaus.mojo:sonar-maven-plugin:3.3.0.603:sonar".
1388 - credentials-binding:
1390 credential-id: "{sonarcloud-api-token-cred-id}"
1394 - timed: "{obj:cron}"
1396 server-name: "{gerrit-server-name}"
1397 trigger-on: "{obj:gerrit_sonar_triggers}"
1399 - project-compare-type: "ANT"
1400 project-pattern: "{project}"
1402 - branch-compare-type: "ANT"
1403 branch-pattern: "**/master"
1412 exclude-pattern: "{jacoco-exclude-pattern}"
1416 - _mvn_sonar_builders: &mvn_sonar_builders
1417 name: mvn-sonar-builders
1419 - lf-infra-pre-build
1422 condition-kind: boolean-expression
1423 condition-expression: "{sonarcloud}"
1425 - shell: echo 'Using SonarCloud'
1426 - lf-infra-maven-sonarcloud:
1427 java-version: "{java-version}"
1428 mvn-goals: "{mvn-goals}"
1429 mvn-settings: "{mvn-settings}"
1430 mvn-version: "{mvn-version}"
1431 sonarcloud-project-key: "{sonarcloud-project-key}"
1432 sonarcloud-project-organization: "{sonarcloud-project-organization}"
1433 sonarcloud-java-version: "{sonarcloud-java-version}"
1434 sonarcloud-qualitygate-wait: "{sonarcloud-qualitygate-wait}"
1435 scan-dev-branch: "{scan-dev-branch}"
1440 condition-kind: boolean-expression
1441 condition-expression: "{sonarcloud}"
1443 - shell: echo 'Using SonarQube'
1444 - lf-infra-maven-sonar:
1445 java-version: "{java-version}"
1446 mvn-goals: "{mvn-goals}"
1447 mvn-settings: "{mvn-settings}"
1448 mvn-version: "{mvn-version}"
1450 - _mvn_sonar_builders_prescan_script: &mvn_sonar_builders_prescan_script
1451 name: mvn-sonar-builders-prescan-script
1453 - shell: "{sonar-prescan-script}"
1454 - lf-infra-pre-build
1457 condition-kind: boolean-expression
1458 condition-expression: "{sonarcloud}"
1460 - shell: echo 'Using SonarCloud'
1461 - lf-infra-maven-sonarcloud:
1462 java-version: "{java-version}"
1463 mvn-goals: "{mvn-goals}"
1464 mvn-settings: "{mvn-settings}"
1465 mvn-version: "{mvn-version}"
1466 sonarcloud-project-key: "{sonarcloud-project-key}"
1467 sonarcloud-project-organization: "{sonarcloud-project-organization}"
1468 sonarcloud-java-version: "{sonarcloud-java-version}"
1469 sonarcloud-qualitygate-wait: "{sonarcloud-qualitygate-wait}"
1470 scan-dev-branch: "{scan-dev-branch}"
1475 condition-kind: boolean-expression
1476 condition-expression: "{sonarcloud}"
1478 - shell: echo 'Using SonarQube'
1479 - lf-infra-maven-sonar:
1480 java-version: "{java-version}"
1481 mvn-goals: "{mvn-goals}"
1482 mvn-settings: "{mvn-settings}"
1483 mvn-version: "{mvn-version}"
1486 name: lf-infra-maven-sbom-generator
1487 # Run Maven goals and trigger SPDX SBOM Generator tool
1490 properties-content: |
1491 SBOM_FLAGS={sbom-flags}
1492 - shell: !include-raw-escape:
1493 - ../shell/sbom-generator.sh
1496 name: lf-infra-maven-sonar
1497 # Run a Sonar build with Maven
1500 mvn-version: "{mvn-version}"
1501 - lf-update-java-alternatives:
1502 java-version: "{java-version}"
1504 # Switch this to the sonar wrapper when JJB 2.0 is available
1505 properties-content: |
1506 SONAR_HOST_URL=$SONAR_URL
1507 MAVEN_GOALS={mvn-goals}
1508 - lf-provide-maven-settings:
1509 global-settings-file: global-settings
1510 settings-file: "{mvn-settings}"
1511 - shell: !include-raw-escape:
1512 - ../shell/common-variables.sh
1513 - ../shell/maven-sonar.sh
1514 - lf-provide-maven-settings-cleanup
1517 name: lf-infra-maven-sonarcloud
1518 # Run a Sonar build with Maven
1521 mvn-version: "{mvn-version}"
1522 - lf-update-java-alternatives:
1523 java-version: "{java-version}"
1525 # Switch this to the sonar wrapper when JJB 2.0 is available
1526 properties-content: |
1527 SONAR_HOST_URL=https://sonarcloud.io
1528 PROJECT_KEY={sonarcloud-project-key}
1529 PROJECT_ORGANIZATION={sonarcloud-project-organization}
1530 MAVEN_GOALS={mvn-goals}
1531 SONARCLOUD_JAVA_VERSION={sonarcloud-java-version}
1532 SCAN_DEV_BRANCH={scan-dev-branch}
1533 SONARCLOUD_QUALITYGATE_WAIT={sonarcloud-qualitygate-wait}
1534 - lf-provide-maven-settings:
1535 global-settings-file: global-settings
1536 settings-file: "{mvn-settings}"
1537 - shell: !include-raw-escape:
1538 - ../shell/common-variables.sh
1539 - ../shell/maven-sonar.sh
1540 - lf-provide-maven-settings-cleanup
1543 name: "{project-name}-sonar"
1544 id: gerrit-maven-sonar
1545 <<: *lf_maven_common
1546 # yamllint disable-line rule:key-duplicates
1548 <<: *mvn_sonar_builders
1551 - lf-infra-gerrit-scm:
1552 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1553 git-url: "{git-url}"
1554 refspec: $GERRIT_REFSPEC
1555 branch: $GERRIT_BRANCH
1556 submodule-recursive: "{submodule-recursive}"
1557 submodule-timeout: "{submodule-timeout}"
1558 submodule-disable: "{submodule-disable}"
1559 choosing-strategy: default
1562 name: "{project-name}-sonar-verify"
1563 id: gerrit-maven-sonar-verify
1564 <<: *lf_maven_common
1565 # yamllint disable-line rule:key-duplicates
1567 <<: *mvn_sonar_builders
1570 scan-dev-branch: true
1571 sonarcloud-qualitygate-wait: false
1573 gerrit_sonar_triggers:
1574 - patchset-created-event:
1575 exclude-drafts: true
1576 exclude-trivial-rebase: false
1577 exclude-no-code-change: false
1578 - draft-published-event
1579 - comment-added-contains-event:
1580 comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
1582 gerrit_trigger_file_paths:
1583 - compare-type: REG_EXP
1588 server-name: "{gerrit-server-name}"
1589 trigger-on: "{obj:gerrit_sonar_triggers}"
1591 - project-compare-type: "ANT"
1592 project-pattern: "{project}"
1594 - branch-compare-type: "ANT"
1595 branch-pattern: "**/{branch}"
1596 file-paths: "{obj:gerrit_trigger_file_paths}"
1599 - lf-infra-gerrit-scm:
1600 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1601 git-url: "{git-url}"
1602 refspec: $GERRIT_REFSPEC
1603 branch: $GERRIT_BRANCH
1604 submodule-recursive: "{submodule-recursive}"
1605 submodule-timeout: "{submodule-timeout}"
1606 submodule-disable: "{submodule-disable}"
1607 choosing-strategy: gerrit
1610 name: "{project-name}-sonar-prescan-script"
1611 id: gerrit-maven-sonar-prescan-script
1612 <<: *lf_maven_common
1613 # yamllint disable-line rule:key-duplicates
1615 <<: *mvn_sonar_builders_prescan_script
1618 - lf-infra-gerrit-scm:
1619 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1620 git-url: "{git-url}"
1621 refspec: $GERRIT_REFSPEC
1622 branch: $GERRIT_BRANCH
1623 submodule-recursive: "{submodule-recursive}"
1624 submodule-timeout: "{submodule-timeout}"
1625 submodule-disable: "{submodule-disable}"
1626 choosing-strategy: default
1629 name: "{project-name}-sonar"
1630 id: github-maven-sonar
1631 <<: *lf_maven_common
1632 # yamllint disable-line rule:key-duplicates
1636 - lf-infra-properties:
1637 build-days-to-keep: "{build-days-to-keep}"
1639 url: "{github-url}/{github-org}/{project}"
1642 - lf-infra-github-scm:
1643 url: "{git-clone-url}{github-org}/{project}"
1644 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
1646 submodule-recursive: "{submodule-recursive}"
1647 submodule-timeout: "{submodule-timeout}"
1648 submodule-disable: "{submodule-disable}"
1649 choosing-strategy: default
1650 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1653 - timed: "{obj:cron}"
1654 - github-pull-request:
1655 trigger-phrase: "^run-sonar$"
1656 only-trigger-phrase: true
1657 status-context: "Maven Sonar"
1662 white-list: "{obj:github_pr_allowlist}"
1663 admin-list: "{obj:github_pr_admin_list}"
1664 white-list-target-branches:
1668 name: "{project-name}-sonar-prescan-script"
1669 id: github-maven-sonar-prescan-script
1670 <<: *lf_maven_common
1671 # yamllint disable-line rule:key-duplicates
1673 <<: *mvn_sonar_builders_prescan_script
1676 - lf-infra-properties:
1677 build-days-to-keep: "{build-days-to-keep}"
1679 url: "{github-url}/{github-org}/{project}"
1682 - lf-infra-github-scm:
1683 url: "{git-clone-url}{github-org}/{project}"
1684 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
1686 submodule-recursive: "{submodule-recursive}"
1687 submodule-timeout: "{submodule-timeout}"
1688 submodule-disable: "{submodule-disable}"
1689 choosing-strategy: default
1690 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1693 - timed: "{obj:cron}"
1694 - github-pull-request:
1695 trigger-phrase: "^run-sonar$"
1696 only-trigger-phrase: true
1697 status-context: "Maven Sonar"
1702 white-list: "{obj:github_pr_allowlist}"
1703 admin-list: "{obj:github_pr_admin_list}"
1704 white-list-target-branches:
1711 - _lf_maven_verify: &lf_maven_verify
1712 name: lf-maven-verify
1714 ######################
1715 # Default parameters #
1716 ######################
1719 build-days-to-keep: 7
1722 git-url: "$GIT_URL/$PROJECT"
1723 github-url: "https://github.com"
1724 jacoco-exclude-pattern: "**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**"
1725 java-version: openjdk11
1726 mvn-global-settings: global-settings
1727 mvn-goals: clean deploy
1729 mvn-params: "-Dstream=$STREAM -Dmaven.source.skip=true"
1731 pre-build-script: "# pre-build script goes here"
1732 post-build-script: "# post-build script goes here"
1734 submodule-recursive: true
1735 submodule-timeout: 10
1736 submodule-disable: false
1738 gerrit_verify_triggers:
1739 - patchset-created-event:
1740 exclude-drafts: true
1741 exclude-trivial-rebase: false
1742 exclude-no-code-change: false
1743 - draft-published-event
1744 - comment-added-contains-event:
1745 comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
1747 gerrit_trigger_file_paths:
1748 - compare-type: REG_EXP
1751 # github_included_regions MUST match gerrit_trigger_file_paths
1752 github_included_regions:
1755 #####################
1756 # Job Configuration #
1757 #####################
1760 disabled: "{disable-job}"
1763 - lf-infra-pre-build
1764 - lf-jacoco-nojava-workaround
1766 mvn-version: "{mvn-version}"
1767 - lf-update-java-alternatives:
1768 java-version: "{java-version}"
1769 - lf-provide-maven-settings:
1770 global-settings-file: "{mvn-global-settings}"
1771 settings-file: "{mvn-settings}"
1772 - shell: "{pre-build-script}"
1774 mvn-goals: "{mvn-goals}"
1775 - shell: "{post-build-script}"
1776 - lf-provide-maven-settings-cleanup
1781 exclude-pattern: "{jacoco-exclude-pattern}"
1785 name: "{project-name}-maven-verify-{stream}-{mvn-version}-{java-version}"
1786 id: gerrit-maven-verify
1787 <<: *lf_maven_common
1788 # yamllint disable-line rule:key-duplicates
1789 <<: *lf_maven_verify
1792 - lf-infra-gerrit-scm:
1793 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1794 git-url: "{git-url}"
1795 refspec: "$GERRIT_REFSPEC"
1796 branch: "$GERRIT_BRANCH"
1797 submodule-recursive: "{submodule-recursive}"
1798 submodule-timeout: "{submodule-timeout}"
1799 submodule-disable: "{submodule-disable}"
1800 choosing-strategy: gerrit
1804 server-name: "{gerrit-server-name}"
1805 trigger-on: "{obj:gerrit_verify_triggers}"
1807 - project-compare-type: ANT
1808 project-pattern: "{project}"
1810 - branch-compare-type: ANT
1811 branch-pattern: "**/{branch}"
1812 file-paths: "{obj:gerrit_trigger_file_paths}"
1815 name: "{project-name}-maven-verify-{stream}-{mvn-version}-{java-version}"
1816 id: github-maven-verify
1817 <<: *lf_maven_common
1818 # yamllint disable-line rule:key-duplicates
1819 <<: *lf_maven_verify
1822 - lf-infra-properties:
1823 build-days-to-keep: "{build-days-to-keep}"
1825 url: "{github-url}/{github-org}/{project}"
1828 - lf-infra-github-scm:
1829 url: "{git-clone-url}{github-org}/{project}"
1830 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
1832 submodule-recursive: "{submodule-recursive}"
1833 submodule-timeout: "{submodule-timeout}"
1834 submodule-disable: "{submodule-disable}"
1835 choosing-strategy: default
1836 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1839 - github-pull-request:
1840 trigger-phrase: "^(recheck|reverify)$"
1841 only-trigger-phrase: false
1842 status-context: "Maven Verify {mvn-version}-{java-version}"
1845 white-list-target-branches:
1847 included-regions: "{obj:github_included_regions}"
1849 ###########################
1850 # Maven Verify for Docker #
1851 ###########################
1853 - _lf_maven_docker_verify: &lf_maven_docker_verify
1854 name: lf-maven-docker-verify
1856 # image push not allowed during verification
1857 mvn-goals: clean install
1860 - lf-infra-pre-build
1861 - lf-jacoco-nojava-workaround
1863 mvn-version: "{mvn-version}"
1864 - lf-update-java-alternatives:
1865 java-version: "{java-version}"
1866 - lf-infra-docker-login:
1867 global-settings-file: "{mvn-global-settings}"
1868 settings-file: "{mvn-settings}"
1869 # must provide maven settings AFTER docker due to its cleanup
1870 - lf-provide-maven-settings:
1871 global-settings-file: "{mvn-global-settings}"
1872 settings-file: "{mvn-settings}"
1874 properties-content: |
1875 CONTAINER_PULL_REGISTRY={container-public-registry}
1877 mvn-goals: "{mvn-goals}"
1878 - lf-provide-maven-settings-cleanup
1881 name: "{project-name}-maven-docker-verify-{stream}-{mvn-version}-{java-version}"
1882 id: gerrit-maven-docker-verify
1883 <<: *lf_maven_common
1884 # yamllint disable-line rule:key-duplicates
1885 <<: *lf_maven_verify
1886 # yamllint disable-line rule:key-duplicates
1887 <<: *lf_maven_docker_verify
1890 - lf-infra-gerrit-scm:
1891 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1892 git-url: "{git-url}"
1893 refspec: "$GERRIT_REFSPEC"
1894 branch: "$GERRIT_BRANCH"
1895 submodule-recursive: "{submodule-recursive}"
1896 submodule-timeout: "{submodule-timeout}"
1897 submodule-disable: "{submodule-disable}"
1898 choosing-strategy: gerrit
1902 server-name: "{gerrit-server-name}"
1903 trigger-on: "{obj:gerrit_verify_triggers}"
1905 - project-compare-type: ANT
1906 project-pattern: "{project}"
1908 - branch-compare-type: ANT
1909 branch-pattern: "**/{branch}"
1910 file-paths: "{obj:gerrit_trigger_file_paths}"
1913 name: "{project-name}-maven-docker-verify-{stream}-{mvn-version}-{java-version}"
1914 id: github-maven-docker-verify
1915 <<: *lf_maven_common
1916 # yamllint disable-line rule:key-duplicates
1917 <<: *lf_maven_verify
1918 # yamllint disable-line rule:key-duplicates
1919 <<: *lf_maven_docker_verify
1922 - lf-infra-properties:
1923 build-days-to-keep: "{build-days-to-keep}"
1925 url: "{github-url}/{github-org}/{project}"
1928 - lf-infra-github-scm:
1929 url: "{git-clone-url}{github-org}/{project}"
1930 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
1932 submodule-recursive: "{submodule-recursive}"
1933 submodule-timeout: "{submodule-timeout}"
1934 submodule-disable: "{submodule-disable}"
1935 choosing-strategy: default
1936 jenkins-ssh-credential: "{jenkins-ssh-credential}"
1939 - github-pull-request:
1940 trigger-phrase: "^(recheck|reverify)$"
1941 only-trigger-phrase: false
1942 status-context: "Maven Docker Verify {mvn-version}-{java-version}"
1945 white-list-target-branches:
1947 included-regions: "{obj:github_included_regions}"
1949 #############################
1950 # Maven Verify Dependencies #
1951 #############################
1953 - _lf_maven_verify_dependencies: &lf_maven_verify_dependencies
1954 name: lf-maven-verify-dependencies
1956 ######################
1957 # Default parameters #
1958 ######################
1961 build-days-to-keep: 7
1964 git-url: "$GIT_URL/$PROJECT"
1965 github-url: "https://github.com"
1966 jacoco-exclude-pattern: "**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**"
1967 java-version: openjdk11
1968 mvn-global-settings: global-settings
1969 mvn-goals: clean deploy
1971 mvn-params: "-Dstream=$STREAM"
1974 submodule-recursive: true
1975 submodule-timeout: 10
1976 submodule-disable: false
1978 gerrit_verify_triggers:
1979 - comment-added-contains-event:
1980 comment-contains-value: "recheck: [0-9 ]+"
1981 gerrit_trigger_file_paths:
1985 #####################
1986 # Job Configuration #
1987 #####################
1990 disabled: "{disable-job}"
1993 - lf-infra-pre-build
1994 - lf-jacoco-nojava-workaround
1996 mvn-version: "{mvn-version}"
1997 - lf-update-java-alternatives:
1998 java-version: "{java-version}"
1999 - lf-provide-maven-settings:
2000 global-settings-file: "{mvn-global-settings}"
2001 settings-file: "{mvn-settings}"
2002 - lf-fetch-dependent-patches
2003 - shell: !include-raw-escape:
2004 - ../shell/common-variables.sh
2005 - ../shell/maven-build-deps.sh
2007 mvn-goals: "{mvn-goals}"
2008 - lf-provide-maven-settings-cleanup
2013 exclude-pattern: "{jacoco-exclude-pattern}"
2017 name: "{project-name}-maven-verify-deps-{stream}-{mvn-version}-{java-version}"
2018 id: gerrit-maven-verify-dependencies
2019 <<: *lf_maven_common
2020 # yamllint disable-line rule:key-duplicates
2021 <<: *lf_maven_verify_dependencies
2024 - lf-infra-gerrit-scm:
2025 jenkins-ssh-credential: "{jenkins-ssh-credential}"
2026 git-url: "{git-url}"
2027 refspec: "$GERRIT_REFSPEC"
2028 branch: "$GERRIT_BRANCH"
2029 submodule-recursive: "{submodule-recursive}"
2030 submodule-timeout: "{submodule-timeout}"
2031 submodule-disable: "{submodule-disable}"
2032 choosing-strategy: gerrit
2036 server-name: "{gerrit-server-name}"
2037 trigger-on: "{obj:gerrit_verify_triggers}"
2039 - project-compare-type: ANT
2040 project-pattern: "{project}"
2042 - branch-compare-type: ANT
2043 branch-pattern: "**/{branch}"
2044 file-paths: "{obj:gerrit_trigger_file_paths}"
2045 comment-text-parameter-mode: PLAIN