[DCAE] Switch to global jobs - java components

Migrate jobs to use global templates
and enable OGR check for verify builds

Change-Id: I62f43702a60c4546466343477e40c0bf9637b7f4
Signed-off-by: vv770d <vv770d@att.com>
Issue-ID: DCAEGEN2-3185
Signed-off-by: vv770d <vv770d@att.com>
diff --git a/jjb/dcaegen2/dcaegen2-analytics-tca-gen2.yaml b/jjb/dcaegen2/dcaegen2-analytics-tca-gen2.yaml
index d56a6e4..06f2439 100644
--- a/jjb/dcaegen2/dcaegen2-analytics-tca-gen2.yaml
+++ b/jjb/dcaegen2/dcaegen2-analytics-tca-gen2.yaml
@@ -3,8 +3,9 @@
     name: dcaegen2-analytics-tca-gen2
     # apply to all jobs
     jobs:
-      - '{project-name}-{stream}-verify-java':
-      - '{project-name}-{stream}-merge-java':
+      - gerrit-maven-verify:
+          pre-build-script: !include-raw-escape: ../../shell/onap-gerrit-review-wrapper.sh
+      - gerrit-maven-merge:
           mvn-goals: 'clean install'
       - '{project-name}-gerrit-release-jobs':
           build-node: centos7-docker-8c-8g
@@ -31,6 +32,8 @@
     mvn-settings: 'dcaegen2-analytics-tca-gen2-settings'
     mvn-version: 'mvn35'
     maven-version: 'mvn35'
+    mvn-snapshot-id: 'ecomp-snapshots'
+    nexus-snapshot-repo: 'snapshots'
     files: '**'
     maven-deploy-properties: |
       deployAtEnd=true
diff --git a/jjb/dcaegen2/dcaegen2-collectors-datafile.yaml b/jjb/dcaegen2/dcaegen2-collectors-datafile.yaml
index 3def2f3..f8ecadf 100644
--- a/jjb/dcaegen2/dcaegen2-collectors-datafile.yaml
+++ b/jjb/dcaegen2/dcaegen2-collectors-datafile.yaml
@@ -19,7 +19,14 @@
       deployAtEnd=true
     archive-artifacts: ''
     build-node: ubuntu1804-docker-8c-8g
+    mvn-snapshot-id: 'ecomp-snapshots'
+    nexus-snapshot-repo: 'snapshots'
     jobs:
+      - gerrit-maven-verify:
+          pre-build-script: !include-raw-escape: ../../shell/onap-gerrit-review-wrapper.sh
+          mvn-goals: 'clean install'
+      - gerrit-maven-merge:
+          mvn-goals: 'clean deploy'
       - gerrit-maven-stage:
           sign-artifacts: true
           build-node: centos7-docker-8c-8g
@@ -31,10 +38,6 @@
           container-public-registry: 'nexus3.onap.org:10001'
           container-staging-registry: 'nexus3.onap.org:10003'
           mvn-goals: 'clean package docker:build -DpushImageTag'
-      - '{project-name}-{stream}-verify-java':
-          mvn-goals: 'clean install'
-      - '{project-name}-{stream}-merge-java':
-          mvn-goals: 'clean deploy'
 
 - project:
     name: dcaegen2-collectors-datafile-sonar
diff --git a/jjb/dcaegen2/dcaegen2-collectors-hv-ves.yaml b/jjb/dcaegen2/dcaegen2-collectors-hv-ves.yaml
index af49108..a78a14b 100644
--- a/jjb/dcaegen2/dcaegen2-collectors-hv-ves.yaml
+++ b/jjb/dcaegen2/dcaegen2-collectors-hv-ves.yaml
@@ -18,11 +18,14 @@
     maven-deploy-properties: |
       deployAtEnd=true
     archive-artifacts: 'hv-collector-coverage/target/site/jacoco-aggregate,**/target/reports/detekt-report.html'
+    mvn-snapshot-id: 'ecomp-snapshots'
+    nexus-snapshot-repo: 'snapshots'
     build-node: ubuntu1804-docker-8c-8g
     jobs:
-      - '{project-name}-{stream}-verify-java':
+      - gerrit-maven-verify:
+          pre-build-script: !include-raw-escape: ../../shell/onap-gerrit-review-wrapper.sh
           mvn-goals: 'clean install'
-      - '{project-name}-{stream}-merge-java':
+      - gerrit-maven-merge:
           mvn-goals: 'clean deploy'
       - '{project-name}-gerrit-release-jobs':
           build-node: centos7-docker-8c-8g
diff --git a/jjb/dcaegen2/dcaegen2-deployments.yaml b/jjb/dcaegen2/dcaegen2-deployments.yaml
index 6345f73..b9af660 100644
--- a/jjb/dcaegen2/dcaegen2-deployments.yaml
+++ b/jjb/dcaegen2/dcaegen2-deployments.yaml
@@ -3,6 +3,8 @@
     name: dcaegen2-deployments
     project-name: 'dcaegen2-deployments'
     jobs:
+      - gerrit-maven-verify:
+          pre-build-script: !include-raw-escape: ../../shell/onap-gerrit-review-wrapper.sh
       - '{project-name}-{stream}-verify-java'
       - '{project-name}-{stream}-merge-java'
       - '{project-name}-{stream}-release-version-java-daily'
@@ -17,6 +19,8 @@
       - 'jakarta':
           branch: 'jakarta'
     mvn-settings: 'dcaegen2-deployments-settings'
+    mvn-snapshot-id: 'ecomp-snapshots'
+    nexus-snapshot-repo: 'snapshots'
     # due to a strange macro / variable translation problem this needs
     # to be passed as a string block to properly get the properties
     # correctly defined in the job
diff --git a/jjb/dcaegen2/dcaegen2-platform-ves-openapi-manager.yaml b/jjb/dcaegen2/dcaegen2-platform-ves-openapi-manager.yaml
index 8641760..e1a776f 100644
--- a/jjb/dcaegen2/dcaegen2-platform-ves-openapi-manager.yaml
+++ b/jjb/dcaegen2/dcaegen2-platform-ves-openapi-manager.yaml
@@ -4,8 +4,9 @@
       project-name: 'dcaegen2-platform-ves-openapi-manager'
       java-version: openjdk11
       jobs:
-          - '{project-name}-{stream}-verify-java'
-          - '{project-name}-{stream}-merge-java'
+          - gerrit-maven-verify:
+                pre-build-script: !include-raw-escape: ../../shell/onap-gerrit-review-wrapper.sh
+          - gerrit-maven-merge
           - gerrit-maven-stage:
                 sign-artifacts: true
                 build-node: centos7-docker-8c-8g
@@ -27,6 +28,8 @@
           - 'jakarta':
               branch: 'jakarta'
       mvn-settings: 'dcaegen2-platform-ves-openapi-manager-settings'
+      mvn-snapshot-id: 'ecomp-snapshots'
+      nexus-snapshot-repo: 'snapshots'
       # due to a strange macro / variable translation problem this needs
       # to be passed as a string block to properly get the properties
       # correctly defined in the job
diff --git a/jjb/dcaegen2/dcaegen2-services-mapper.yaml b/jjb/dcaegen2/dcaegen2-services-mapper.yaml
index dd6dab7..272140e 100644
--- a/jjb/dcaegen2/dcaegen2-services-mapper.yaml
+++ b/jjb/dcaegen2/dcaegen2-services-mapper.yaml
@@ -4,8 +4,9 @@
     project-name: 'dcaegen2-services-mapper'
     java-version: openjdk11
     jobs:
-      - '{project-name}-{stream}-verify-java'
-      - '{project-name}-{stream}-merge-java'
+      - gerrit-maven-verify:
+          pre-build-script: !include-raw-escape: ../../shell/onap-gerrit-review-wrapper.sh
+      - gerrit-maven-merge
       - gerrit-maven-stage:
           sign-artifacts: true
           build-node: centos7-builder-4c-4g
@@ -27,6 +28,8 @@
       - 'jakarta':
           branch: 'jakarta'
     mvn-settings: 'dcaegen2-services-mapper-settings'
+    mvn-snapshot-id: 'ecomp-snapshots'
+    nexus-snapshot-repo: 'snapshots'
     files: '**'
     archive-artifacts: ''
     build-node: 'ubuntu1804-docker-8c-8g'
diff --git a/jjb/dcaegen2/dcaegen2-services-pm-mapper.yaml b/jjb/dcaegen2/dcaegen2-services-pm-mapper.yaml
index 7b54460..a90e701 100644
--- a/jjb/dcaegen2/dcaegen2-services-pm-mapper.yaml
+++ b/jjb/dcaegen2/dcaegen2-services-pm-mapper.yaml
@@ -14,16 +14,19 @@
     # apply to all jobs
     project: 'dcaegen2/services/pm-mapper'
     mvn-settings: 'dcaegen2-services-pm-mapper-settings'
+    mvn-snapshot-id: 'ecomp-snapshots'
+    nexus-snapshot-repo: 'snapshots'
     maven-deploy-properties: |
       deployAtEnd=true
     files: '**'
     archive-artifacts: ''
     build-node: ubuntu1804-docker-8c-8g
     jobs:
-      - '{project-name}-{stream}-verify-java':
-        mvn-goals: 'clean install docker:build'
-      - '{project-name}-{stream}-merge-java':
-        mvn-goals: 'clean deploy'
+      - gerrit-maven-verify:
+          pre-build-script: !include-raw-escape: ../../shell/onap-gerrit-review-wrapper.sh
+          mvn-goals: 'clean install docker:build'
+      - gerrit-maven-merge:
+          mvn-goals: 'clean deploy'
       - gerrit-maven-stage:
           sign-artifacts: true
           build-node: centos7-docker-8c-8g
diff --git a/jjb/dcaegen2/dcaegen2-services-prh.yaml b/jjb/dcaegen2/dcaegen2-services-prh.yaml
index 5399481..6e22469 100644
--- a/jjb/dcaegen2/dcaegen2-services-prh.yaml
+++ b/jjb/dcaegen2/dcaegen2-services-prh.yaml
@@ -3,8 +3,9 @@
     name: dcaegen2-services-prh
     project-name: 'dcaegen2-services-prh'
     jobs:
-      - '{project-name}-{stream}-verify-java'
-      - '{project-name}-{stream}-merge-java'
+      - gerrit-maven-verify:
+          pre-build-script: !include-raw-escape: ../../shell/onap-gerrit-review-wrapper.sh
+      - gerrit-maven-merge
       - gerrit-maven-stage:
           sign-artifacts: true
           build-node: centos7-docker-8c-8g
@@ -26,6 +27,8 @@
           branch: 'jakarta'
     java-version: openjdk11
     mvn-settings: 'dcaegen2-services-prh-settings'
+    mvn-snapshot-id: 'ecomp-snapshots'
+    nexus-snapshot-repo: 'snapshots'
     files: '**'
     archive-artifacts: ''
     build-node: 'ubuntu1804-docker-8c-8g'
diff --git a/jjb/dcaegen2/dcaegen2-services-sdk.yaml b/jjb/dcaegen2/dcaegen2-services-sdk.yaml
index 1e61d4a..1ac1745 100644
--- a/jjb/dcaegen2/dcaegen2-services-sdk.yaml
+++ b/jjb/dcaegen2/dcaegen2-services-sdk.yaml
@@ -3,8 +3,9 @@
     name: dcaegen2-services-sdk
     project-name: 'dcaegen2-services-sdk'
     jobs:
-      - '{project-name}-{stream}-verify-java'
-      - '{project-name}-{stream}-merge-java'
+      - gerrit-maven-verify:
+          pre-build-script: !include-raw-escape: ../../shell/onap-gerrit-review-wrapper.sh
+      - gerrit-maven-merge
       - gerrit-maven-stage:
           sign-artifacts: true
           build-node: centos7-docker-8c-8g
@@ -22,6 +23,8 @@
           branch: 'jakarta'
     java-version: openjdk11
     mvn-settings: 'dcaegen2-services-sdk-settings'
+    mvn-snapshot-id: 'ecomp-snapshots'
+    nexus-snapshot-repo: 'snapshots'
     files: '**'
     archive-artifacts: ''
     build-node: 'centos7-docker-8c-8g'
diff --git a/jjb/dcaegen2/dcaegen2-services-son-handler.yaml b/jjb/dcaegen2/dcaegen2-services-son-handler.yaml
index 2b0e443..a9c173c 100644
--- a/jjb/dcaegen2/dcaegen2-services-son-handler.yaml
+++ b/jjb/dcaegen2/dcaegen2-services-son-handler.yaml
@@ -3,8 +3,9 @@
     name: dcaegen2-services-son-handler
     project-name: 'dcaegen2-services-son-handler'
     jobs:
-      - '{project-name}-{stream}-verify-java'
-      - '{project-name}-{stream}-merge-java'
+      - gerrit-maven-verify:
+          pre-build-script: !include-raw-escape: ../../shell/onap-gerrit-review-wrapper.sh
+      - gerrit-maven-merge
       - gerrit-maven-stage:
           sign-artifacts: true
           build-node: centos7-docker-8c-8g
@@ -16,7 +17,6 @@
           mvn-goals: 'clean package docker:build -DpushImageTag'
       - '{project-name}-gerrit-release-jobs':
           build-node: centos7-docker-8c-8g
-
     project: 'dcaegen2/services/son-handler'
     stream:
       - 'master':
@@ -27,6 +27,8 @@
           branch: 'jakarta'
     java-version: openjdk11
     mvn-settings: 'dcaegen2-services-son-handler-settings'
+    mvn-snapshot-id: 'ecomp-snapshots'
+    nexus-snapshot-repo: 'snapshots'
     files: '**'
     archive-artifacts: ''
     build-node: 'ubuntu1804-docker-8c-8g'
diff --git a/jjb/dcaegen2/dcaegen2-utils.yaml b/jjb/dcaegen2/dcaegen2-utils.yaml
index fca7af2..61e9ab7 100644
--- a/jjb/dcaegen2/dcaegen2-utils.yaml
+++ b/jjb/dcaegen2/dcaegen2-utils.yaml
@@ -5,10 +5,11 @@
     python-version: python3
 
     jobs:
+      - gerrit-maven-verify:
+          pre-build-script: !include-raw-escape: ../../shell/onap-gerrit-review-wrapper.sh
       - '{project-name}-{stream}-verify-java'
       - '{project-name}-{stream}-merge-java'
       - '{project-name}-{stream}-release-version-java-daily'
-
     project: 'dcaegen2/utils'
     stream:
       - 'master':
@@ -18,6 +19,8 @@
       - 'jakarta':
           branch: 'jakarta'
     mvn-settings: 'dcaegen2-utils-settings'
+    mvn-snapshot-id: 'ecomp-snapshots'
+    nexus-snapshot-repo: 'snapshots'
     # due to a strange macro / variable translation problem this needs
     # to be passed as a string block to properly get the properties
     # correctly defined in the job