2 - job-template: &verify_java_defaults
3 # Job template for Java verify jobs
5 # The purpose of this job template is to run:
6 # 1. maven clean install
9 # branch: git branch (eg. stable/lithium or master)
11 name: '{project-name}-{stream}-verify-java'
13 project-type: freestyle
16 build-env-variables: ''
21 java-version: openjdk8
24 build-days-to-keep: '{build-days-to-keep}'
30 refspec: 'refs/heads/{branch}'
31 artifacts: '{archive-artifacts}'
33 maven-version: '{maven-version}'
35 mvn-params: '{mvn-params}'
39 refspec: '$GERRIT_REFSPEC'
40 choosing-strategy: 'gerrit'
41 submodule-recursive: '{submodule-recursive}'
45 build-timeout: '{build-timeout}'
48 - gerrit-trigger-patch-submitted:
49 server: '{server-name}'
52 files: '{obj:pattern}'
56 - lf-update-java-alternatives:
57 java-version: "{java-version}"
58 - provide-maven-settings:
59 global-settings-file: 'global-settings'
60 settings-file: '{mvn-settings}'
62 properties-content: "{build-env-variables}"
64 maven-version: '{maven-version}'
66 goals: 'clean install -B
67 -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn {mvn-params}'
69 - MAVEN_OPTS='{mvn-opts}'
72 settings: '{mvn-settings}'
74 global-settings: 'global-settings'
75 global-settings-type: cfp
81 # Job template for Java verify jobs running checkstyle at the end
82 # When checkstyle will be fully incorporated, it is meant to replace
83 # '{project-name}-{stream}-verify-java-checkstyle'
85 # The purpose of this job template is to run:
86 # 1. maven clean install
88 # This job publishes checkstyle results.
91 # branch: git branch (eg. stable/lithium or master)
93 <<: *verify_java_defaults
94 name: '{project-name}-{stream}-verify-java-checkstyle'
101 # Job template for Java verify jobs with POM not at the root
103 # The purpose of this job template is to run:
104 # 1. maven clean install
106 # This job supports subprojects.
108 # Required Variables:
109 # branch: git branch (eg. stable/lithium or master)
110 # pom: name/location of the pom.xml file relative to the workspace
111 # pattern: ant file-path pattern relative to the workspace used to
114 <<: *verify_java_defaults
115 name: '{project-name}-{stream}-{subproject}-verify-java'
118 # Job template for Java integration pairwise jobs
120 # The purpose of this job template is to run:
121 # 1. maven clean install
123 # Required Variables:
124 # branch: git branch (eg. stable/lithium or master)
126 <<: *verify_java_defaults
127 name: '{project-name}-{stream}-integration-pairwise'
130 - gerrit-trigger-patch-submitted:
131 server: '{server-name}'
134 files: '{obj:pattern}'
137 # Job template for Java daily release jobs running checkstyle at the end
138 # When checkstyle will be fully incorporated, it is meant to replace
139 # '{project-name}-{stream}-release-java-daily'
141 # The purpose of this job template is to run:
142 # 1. maven clean deploy with Sonar scans
144 # This job publishes checkstyle results.
145 # This job uses a conditional regex match step to set versions.
147 # Required Variables:
148 # branch: git branch (eg. stable/lithium or master)
150 name: '{project-name}-{stream}-release-java-daily-checkstyle'
151 project-type: freestyle
153 disabled: '{disabled}'
154 maven-deploy-properties:
157 build-days-to-keep: '{build-days-to-keep}'
162 refspec: 'refs/heads/{branch}'
163 artifacts: '{archive-artifacts}'
165 maven-version: '{maven-version}'
167 - gerrit-trigger-scm:
169 choosing-strategy: 'default'
170 submodule-recursive: '{submodule-recursive}'
173 build-timeout: '{build-timeout}'
177 - gerrit-trigger-release-manually:
178 server: '{server-name}'
183 - provide-maven-settings:
184 global-settings-file: 'global-settings'
185 settings-file: '{mvn-settings}'
187 condition-kind: regex-match
189 label: '{setVersion}'
192 properties-file: version.properties
193 - maven-set-release-version:
194 maven-version: '{maven-version}'
195 mvn-settings: '{mvn-settings}'
198 maven-version: '{maven-version}'
199 goals: 'clean deploy -B
200 -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn'
201 properties: '{obj:mvn_properties}'
202 settings: '{mvn-settings}'
204 global-settings: 'global-settings'
205 global-settings-type: cfp
209 - checkstyle-result-daily
212 # Job template for Java daily release jobs
214 # The purpose of this job template is to run:
215 # 1. maven set versions
216 # 2. maven clean deploy with Sonar scans
218 # Required Variables:
219 # branch: git branch (eg. stable/lithium or master)
221 name: '{project-name}-{stream}-release-version-java-daily'
223 project-type: freestyle
224 disabled: '{disabled}'
226 maven-deploy-properties:
229 build-days-to-keep: '{build-days-to-keep}'
235 refspec: 'refs/heads/{branch}'
236 artifacts: '{archive-artifacts}'
238 maven-version: '{maven-version}'
241 - gerrit-trigger-scm:
243 choosing-strategy: 'default'
244 submodule-recursive: '{submodule-recursive}'
248 build-timeout: '{build-timeout}'
253 - gerrit-trigger-release-manually:
254 server: '{server-name}'
260 - provide-maven-settings:
261 global-settings-file: 'global-settings'
262 settings-file: '{mvn-settings}'
265 properties-file: version.properties
266 - maven-set-release-version:
267 maven-version: '{maven-version}'
268 mvn-settings: '{mvn-settings}'
272 maven-version: '{maven-version}'
273 goals: 'clean deploy -B
274 -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn'
276 - '{maven-deploy-properties}'
277 settings: '{mvn-settings}'
279 global-settings: 'global-settings'
280 global-settings-type: cfp
285 - job-template: &merge_java_defaults
286 # Job template for Java merge jobs
288 # The purpose of this job template is to run:
289 # 1. maven clean deploy
291 # Required Variables:
292 # branch: git branch (eg. stable/lithium or master)
294 name: '{project-name}-{stream}-merge-java'
296 project-type: freestyle
304 java-version: openjdk8
308 build-days-to-keep: '{build-days-to-keep}'
314 refspec: 'refs/heads/{branch}'
315 artifacts: '{archive-artifacts}'
317 maven-version: '{maven-version}'
320 - gerrit-trigger-scm:
322 choosing-strategy: 'default'
323 submodule-recursive: '{submodule-recursive}'
327 build-timeout: '{build-timeout}'
328 jenkins-ssh-credential: '{jenkins-ssh-credential}'
331 - gerrit-trigger-patch-merged:
332 server: '{server-name}'
339 - lf-update-java-alternatives:
340 java-version: "{java-version}"
341 - provide-maven-settings:
342 global-settings-file: 'global-settings'
343 settings-file: '{mvn-settings}'
345 condition-kind: regex-match
346 regex: .*(amd64|arm64).*
347 label: '{project-name}'
349 - shell: !include-raw-escape: global-jjb/shell/docker-login.sh
351 maven-version: '{maven-version}'
353 goals: 'clean deploy -B {mvn-params}
354 -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn'
356 - MAVEN_OPTS='{mvn-opts}'
359 settings: '{mvn-settings}'
361 global-settings: 'global-settings'
362 global-settings-type: cfp
363 properties: '{obj:mvn_properties}'
369 # Job template for Java merge jobs based on
370 # '{project-name}-{stream}-merge-java'
371 # The purpose of this job template is to run:
372 # 1. maven clean deploy
374 # This project supports maven properties.
376 # Required Variables:
377 # branch: git branch (eg. stable/lithium or master)
378 # maven-properties: properties passed to maven
380 <<: *merge_java_defaults
381 name: '{project-name}-{stream}-merge-properties-java'
385 build-timeout: '{build-timeout}'
386 jenkins-ssh-credential: '{jenkins-ssh-credential}'
389 # Job template for Java merge jobs that takes a maven template
391 # The purpose of this job template is to run:
392 # 1. maven clean deploy -P {mvn-profile}
394 # Required Variables:
395 # branch: git branch (eg. stable/lithium or master)
397 <<: *merge_java_defaults
398 name: '{project-name}-{stream}-merge-profile-java'
402 - provide-maven-settings:
403 global-settings-file: 'global-settings'
404 settings-file: '{mvn-settings}'
409 maven-version: '{maven-version}'
410 goals: 'clean deploy -P {mvn-profile} -B
411 -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn'
412 settings: '{mvn-settings}'
414 global-settings: 'global-settings'
415 global-settings-type: cfp
417 - docker.pull.registry=nexus3.onap.org:10001
418 - docker.push.registry=nexus3.onap.org:10003
421 # Job template for Java merge jobs with POM not at the root
423 # The purpose of this job template is to run:
424 # 1. maven clean deploy
426 # This job supports subprojects.
428 # Required Variables:
429 # branch: git branch (eg. stable/lithium or master)
430 # pom: name/location of the pom.xml file relative to the workspace
431 # pattern: ant file-path pattern relative to the workspace used to
434 <<: *merge_java_defaults
435 name: '{project-name}-{stream}-{subproject}-merge-java'
437 - job-template: &docker_java_defaults
438 # Job template for Docker daily jobs
440 # The purpose of this job template is to run:
441 # 1. login to the docker registry
444 # Required Variables:
445 # branch: git branch (eg. stable/lithium or master)
447 name: '{project-name}-{stream}-docker-java-daily'
448 id: '{project-name}-{stream}-docker-java-daily'
449 project-type: freestyle
451 disabled: '{disabled}'
452 java-version: openjdk8
455 build-days-to-keep: '{build-days-to-keep}'
461 refspec: 'refs/heads/{branch}'
462 artifacts: '{archive-artifacts}'
464 maven-version: '{maven-version}'
466 mvn-params: '{mvn-params}'
469 - gerrit-trigger-scm:
471 choosing-strategy: 'default'
472 submodule-recursive: '{submodule-recursive}'
476 build-timeout: '{build-timeout}'
481 - gerrit-trigger-release-manually:
482 server: '{server-name}'
488 - lf-update-java-alternatives:
489 java-version: "{java-version}"
491 - provide-maven-settings:
492 global-settings-file: 'global-settings'
493 settings-file: '{mvn-settings}'
497 - maven-docker-push-daily:
498 maven-version: '{maven-version}'
499 mvn-settings: '{mvn-settings}'
501 # use default as mvn-profile if profile is not needed
502 mvn-profile: '{mvn-profile}'
503 mvn-params: '{mvn-params}'
509 # Job template for Docker daily jobs
511 # The purpose of this job template is to run:
512 # 1. login to the docker registry
515 # Required Variables:
516 # branch: git branch (eg. stable/lithium or master)
518 <<: *docker_java_defaults
519 name: '{project-name}-{stream}-docker-java-daily'
520 id: docker-java-daily
523 - infra-wrappers-docker-build:
524 build-timeout: '{build-timeout}'
527 # Job template for building & pushing docker images
529 # The purpose of this job template is to run:
530 # 1. login to the docker registry
531 # 2. run a specified shell builder
533 # Required Variables:
534 # pom: name/location of the pom.xml file relative to the workspace
535 # maven-properties: properties passed to maven
537 name: '{project-name}-{stream}-docker-java-shell-daily'
538 project-type: freestyle
540 disabled: '{disabled}'
543 build-days-to-keep: '{build-days-to-keep}'
549 refspec: 'refs/heads/{branch}'
550 artifacts: '{archive-artifacts}'
552 maven-version: '{maven-version}'
555 - gerrit-trigger-scm:
557 choosing-strategy: 'default'
558 submodule-recursive: '{submodule-recursive}'
562 build-timeout: '{build-timeout}'
567 - gerrit-trigger-release-manually:
568 server: '{server-name}'
574 - provide-maven-settings:
575 global-settings-file: 'global-settings'
576 settings-file: '{mvn-settings}'
581 maven-version: '{maven-version}'
583 settings: '{mvn-settings}'
585 global-settings: 'global-settings'
586 global-settings-type: cfp
594 # Job template for building & pushing docker images
596 # The purpose of this job template is to run:
597 # 1. login to the docker registry
598 # 2. run a specified shell builder
600 # Required Variables:
601 # pom: name/location of the pom.xml file relative to the workspace
602 # maven-properties: properties passed to maven
604 name: '{project-name}-{stream}-{subproject}-docker-java-shell-daily'
605 project-type: freestyle
607 disabled: '{disabled}'
610 build-days-to-keep: '{build-days-to-keep}'
616 refspec: 'refs/heads/{branch}'
617 artifacts: '{archive-artifacts}'
619 maven-version: '{maven-version}'
622 - gerrit-trigger-scm:
624 choosing-strategy: 'default'
625 submodule-recursive: '{submodule-recursive}'
629 build-timeout: '{build-timeout}'
634 - gerrit-trigger-release-manually:
635 server: '{server-name}'
641 - provide-maven-settings:
642 global-settings-file: 'global-settings'
643 settings-file: '{mvn-settings}'
648 maven-version: '{maven-version}'
651 settings: '{mvn-settings}'
653 global-settings: 'global-settings'
654 global-settings-type: cfp
662 # Job template for building & pushing docker images
664 # The purpose of this job template is to run:
665 # 1. login to the docker registry
666 # 2. inject a version.properties file and set versions
667 # 3. run a specified shell builder
669 # Required Variables:
670 # pom: name/location of the pom.xml file relative to the workspace
671 # maven-properties: properties passed to maven
673 name: '{project-name}-{stream}-docker-java-version-shell-daily'
674 project-type: freestyle
676 disabled: '{disabled}'
679 build-days-to-keep: '{build-days-to-keep}'
685 refspec: 'refs/heads/{branch}'
686 artifacts: '{archive-artifacts}'
688 maven-version: '{maven-version}'
691 - gerrit-trigger-scm:
693 choosing-strategy: 'default'
694 submodule-recursive: '{submodule-recursive}'
698 build-timeout: '{build-timeout}'
703 - gerrit-trigger-release-manually:
704 server: '{server-name}'
710 - provide-maven-settings:
711 global-settings-file: 'global-settings'
712 settings-file: '{mvn-settings}'
715 properties-file: version.properties
716 - maven-set-release-version:
717 maven-version: '{maven-version}'
718 mvn-settings: '{mvn-settings}'
724 maven-version: '{maven-version}'
726 settings: '{mvn-settings}'
728 global-settings: 'global-settings'
729 global-settings-type: cfp
737 # Job template for building & pushing docker images
739 # The purpose of this job template is to run:
740 # 1. login to the docker registry
741 # 2. inject a version.properties file and set versions
742 # 3. run a specified shell builder
744 # This template supports subprojects.
746 # Required Variables:
747 # pom: name/location of the pom.xml file relative to the workspace
748 # maven-properties: properties passed to maven
750 name: '{project-name}-{stream}-{subproject}-docker-java-version-shell-daily'
751 project-type: freestyle
752 node: 'ubuntu1804-docker-8c-8g'
753 disabled: '{disabled}'
756 build-days-to-keep: '{build-days-to-keep}'
762 refspec: 'refs/heads/{branch}'
763 artifacts: '{archive-artifacts}'
765 maven-version: '{maven-version}'
768 - gerrit-trigger-scm:
770 choosing-strategy: 'default'
771 submodule-recursive: '{submodule-recursive}'
775 build-timeout: '{build-timeout}'
780 - gerrit-trigger-release-manually:
781 server: '{server-name}'
787 - provide-maven-settings:
788 global-settings-file: 'global-settings'
789 settings-file: '{mvn-settings}'
792 properties-file: version.properties
793 - maven-set-release-version:
794 maven-version: '{maven-version}'
795 mvn-settings: '{mvn-settings}'
801 maven-version: '{maven-version}'
804 settings: '{mvn-settings}'
806 global-settings: 'global-settings'
807 global-settings-type: cfp
814 - job-template: &docker_version_java_defaults
815 # Job template for building & pushing docker images
817 # The purpose of this job template is to run:
818 # 1. login to the docker registry
819 # 2. inject a version.properties file and set versions
820 # 3. run a docker push
822 # Required Variables:
823 # pom: name/location of the pom.xml file relative to the workspace
824 # profile: the docker profile defined in the pom
825 # maven-properties: properties passed to maven
827 name: '{project-name}-{stream}-docker-version-java-daily'
828 id: '{project-name}-{stream}-docker-version-java-daily'
829 project-type: freestyle
831 disabled: '{disabled}'
834 build-days-to-keep: '{build-days-to-keep}'
840 refspec: 'refs/heads/{branch}'
841 artifacts: '{archive-artifacts}'
843 maven-version: '{maven-version}'
845 mvn-params: '{mvn-params}'
848 - gerrit-trigger-scm:
850 choosing-strategy: 'default'
851 submodule-recursive: '{submodule-recursive}'
855 build-timeout: '{build-timeout}'
860 - gerrit-trigger-release-manually:
861 server: '{server-name}'
867 - provide-maven-settings:
868 global-settings-file: 'global-settings'
869 settings-file: '{mvn-settings}'
872 properties-file: version.properties
873 - maven-set-release-version:
874 maven-version: '{maven-version}'
875 mvn-settings: '{mvn-settings}'
880 - maven-docker-push-daily:
881 maven-version: '{maven-version}'
882 mvn-settings: '{mvn-settings}'
884 # use default as mvn-profile if profile is not needed
885 mvn-profile: '{mvn-profile}'
886 mvn-params: '{mvn-params}'
892 # Job template for building & pushing docker images
894 # The purpose of this job template is to run:
895 # 1. login to the docker registry
896 # 2. inject a version.properties file and set versions
897 # 3. run a docker push
899 # Required Variables:
900 # pom: name/location of the pom.xml file relative to the workspace
901 # profile: the docker profile defined in the pom
902 # maven-properties: properties passed to maven
904 <<: *docker_version_java_defaults
905 name: '{project-name}-{stream}-docker-version-java-daily'
906 id: 'docker-version-java-daily'
909 - infra-wrappers-docker-build:
910 build-timeout: '{build-timeout}'
913 # Job template for building & pushing docker images for AAI specific repos
915 # The purpose of this job template is to run:
916 # 1. login to the docker registry
918 # 3. run include-docker-push.sh
920 # Required Variables:
921 # pom: name/location of the pom.xml file relative to the workspace
922 # maven-properties: properties passed to maven
924 name: '{project-name}-{stream}-aai-docker-java-daily'
925 project-type: freestyle
927 docker-image-name: ''
928 disabled: '{disabled}'
929 java-version: 'openjdk8'
932 build-days-to-keep: '{build-days-to-keep}'
938 refspec: 'refs/heads/{branch}'
939 artifacts: '{archive-artifacts}'
941 maven-version: '{maven-version}'
943 docker-image-name: '{docker-image-name}'
946 - gerrit-trigger-scm:
948 choosing-strategy: 'default'
949 submodule-recursive: '{submodule-recursive}'
953 build-timeout: '{build-timeout}'
958 - gerrit-trigger-release-manually:
959 server: '{server-name}'
965 - lf-update-java-alternatives:
966 java-version: "{java-version}"
967 - provide-maven-settings:
968 global-settings-file: 'global-settings'
969 settings-file: '{mvn-settings}'
974 maven-version: '{maven-version}'
976 goals: 'clean install -DskipTests -B
977 -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn'
978 settings: '{mvn-settings}'
980 global-settings: 'global-settings'
981 global-settings-type: cfp
984 maven-version: '{maven-version}'
987 settings: '{mvn-settings}'
989 global-settings: 'global-settings'
990 global-settings-type: cfp
992 - maven.test.skip=true
993 - docker.pull.registry=nexus3.onap.org:10001
994 - docker.push.registry=nexus3.onap.org:10003
996 - shell: !include-raw-escape: include-docker-push.sh
1002 # Job template for Java merge jobs for SDC specific repos
1004 # The purpose of this job template is to run:
1005 # 1. maven clean deploy
1007 # Required Variables:
1008 # branch: git branch (eg. stable/lithium or master)
1010 <<: *merge_java_defaults
1011 name: '{project-name}-{stream}-sdc-merge-java'
1013 node: '{build-node}'
1017 - lf-infra-pre-build
1018 - lf-update-java-alternatives:
1019 java-version: "{java-version}"
1020 - provide-maven-settings:
1021 global-settings-file: 'global-settings'
1022 settings-file: '{mvn-settings}'
1026 - maven-docker-push-daily:
1027 maven-version: '{maven-version}'
1028 mvn-settings: '{mvn-settings}'
1030 # use default as mvn-profile if profile is not needed
1031 mvn-profile: '{mvn-profile}'
1035 # Job template for Java merge jobs on multiple architectures
1037 # The purpose of this job template is to:
1038 # 1. Run parallel {project-name}-{stream}-verify-java jobs for each supported architecture
1039 # 2. Build and push a docker manifest list for the images created by
1042 name: '{project-name}-multiarch-{stream}-merge-java'
1043 node: '{build-node}'
1044 project-type: multijob
1045 disabled: '{obj:disabled}'
1049 - lf-infra-parameters:
1050 project: '{project}'
1054 name: DOCKER_REGISTRY
1057 name: DOCKERHUB_REGISTRY
1058 default: 'registry-1.docker.io'
1065 use-build-blocker: true
1067 - '{project-name}-.*-merge-.*'
1068 blocking-level: 'NODE'
1071 - gerrit-trigger-scm:
1073 choosing-strategy: 'default'
1074 submodule-recursive: '{submodule-recursive}'
1078 build-timeout: '{build-timeout}'
1081 - gerrit-trigger-patch-merged:
1082 server: '{server-name}'
1083 project: '{project}'
1089 name: 'build docker images'
1091 execution-type: PARALLEL
1093 - name: '{project-name}-amd64-{stream}-merge-java'
1094 kill-phase-on: FAILURE
1095 current-parameters: true
1096 - name: '{project-name}-arm64-{stream}-merge-java'
1097 kill-phase-on: NEVER
1098 current-parameters: true
1100 name: 'publish docker manifest'
1101 condition: SUCCESSFUL
1102 execution-type: PARALLEL
1104 - name: '{project-name}-docker-manifest-{stream}'
1105 current-parameters: true
1106 predefined-parameters: |
1107 PARENT_JOB_NAME=$JOB_NAME
1108 DOCKERHUB_REGISTRY=docker.io