Merge "Migrate to gerrit-maven-stage (UI)"
diff --git a/global-jjb b/global-jjb
index bfea76c..f56fb39 160000
--- a/global-jjb
+++ b/global-jjb
@@ -1 +1 @@
-Subproject commit bfea76c9bead88faf10a3ad41ae98ad741ac1b91
+Subproject commit f56fb3983c20cf5256a544350ac7f7eced1a0045
diff --git a/jjb/aaf/aaf-sshsm.yaml b/jjb/aaf/aaf-sshsm.yaml
index 6e4ab2e..31e7006 100644
--- a/jjb/aaf/aaf-sshsm.yaml
+++ b/jjb/aaf/aaf-sshsm.yaml
@@ -5,10 +5,10 @@
     build-timeout: 120
     project: 'aaf/sshsm'
     jobs:
-      - '{project-name}-{stream}-verify-c':
+      - gerrit-verify-c:
          script:
             !include-raw-escape: 'build-sshsm.sh'
-      - '{project-name}-{stream}-docker-c-shell-daily':
+      - gerrit-docker-c-shell-daily:
          script:
             !include-raw-escape: 'build-sshsm-docker-images.sh'
     stream:
diff --git a/jjb/aai/aai-graphgraph.yaml b/jjb/aai/aai-graphgraph.yaml
index b1b4c7a..31cedd1 100644
--- a/jjb/aai/aai-graphgraph.yaml
+++ b/jjb/aai/aai-graphgraph.yaml
@@ -11,6 +11,13 @@
     jobs:
       - '{project-name}-{stream}-verify-java'
       - '{project-name}-{stream}-merge-java'
+      - '{project-name}-{stream}-release-version-java-daily'
+      - '{project-name}-{stream}-docker-java-daily':
+          docker-pom: 'pom.xml'
+          mvn-profile: 'docker'
+          mvn-params: '-Dmaven.test.skip=true'
+          build-node: ubuntu1604-docker-2c-4g
+
     project: 'aai/graphgraph'
     stream:
       - 'master':
diff --git a/jjb/global-defaults.yaml b/jjb/global-defaults.yaml
index e43a8a2..b86e653 100644
--- a/jjb/global-defaults.yaml
+++ b/jjb/global-defaults.yaml
@@ -47,6 +47,7 @@
 
     # git submodule attributes
     submodule-recursive: true
+    submodule-disable: false
 
     # Jenkins
     jenkins-ssh-credential: onap-jenkins-ssh
diff --git a/jjb/global-templates-c.yaml b/jjb/global-templates-c.yaml
index 9f9bdf9..4669e82 100644
--- a/jjb/global-templates-c.yaml
+++ b/jjb/global-templates-c.yaml
@@ -1,5 +1,58 @@
 ---
-# vim: sw=2 ts=2 sts=2 et :
+####################
+# COMMON FUNCTIONS #
+####################
+
+- c_job_common: &c_job_common
+    name: c-job-common
+
+    ######################
+    # Default parameters #
+    ######################
+
+    branch: master
+    submodule-recursive: true
+    submodule-timeout: 10
+
+    #####################
+    # Job Configuration #
+    #####################
+
+    project-type: freestyle
+    node: '{build-node}'
+    disabled: false
+
+    properties:
+      - infra-properties:
+          build-days-to-keep: '{build-days-to-keep}'
+
+    parameters:
+      - lf-infra-parameters:
+          project: '{project}'
+          branch: '{branch}'
+          stream: '{stream}'
+
+    scm:
+      - lf-infra-gerrit-scm:
+          jenkins-ssh-credential: '{jenkins-ssh-credential}'
+          git-url: '$GIT_URL/$PROJECT'
+          refspec: '$GERRIT_REFSPEC'
+          branch: '$GERRIT_BRANCH'
+          submodule-recursive: '{submodule-recursive}'
+          submodule-timeout: '{submodule-timeout}'
+          choosing-strategy: default
+
+    wrappers:
+      - lf-infra-wrappers:
+          build-timeout: '{build-timeout}'
+          jenkins-ssh-credential: '{jenkins-ssh-credential}'
+
+    publishers:
+      - lf-infra-publish
+
+#################
+# JOB TEMPLATES #
+#################
 
 - job-template:
     #
@@ -8,33 +61,9 @@
     # Required Variables:
     #   script:         build script to execute
     #
-
     name: '{project-name}-{stream}-verify-c'
-    project-type: freestyle
-    node: '{build-node}'
-
-    properties:
-      - infra-properties:
-          build-days-to-keep: '{build-days-to-keep}'
-
-    parameters:
-      - infra-parameters:
-          project: '{project}'
-          branch: '{branch}'
-          refspec: 'refs/heads/{branch}'
-          artifacts: '{archive-artifacts}'
-      - maven-exec:
-          maven-version: '{maven-version}'
-
-    scm:
-      - gerrit-trigger-scm:
-          refspec: '$GERRIT_REFSPEC'
-          choosing-strategy: 'gerrit'
-          submodule-recursive: '{submodule-recursive}'
-
-    wrappers:
-      - infra-wrappers:
-          build-timeout: '{build-timeout}'
+    id: gerrit-verify-c
+    <<: *c_job_common
 
     triggers:
       - gerrit-trigger-patch-submitted:
@@ -47,11 +76,6 @@
       - lf-infra-pre-build
       - shell: '{script}'
 
-    publishers:
-      - infra-shiplogs:
-          maven-version: '{maven-version}'
-
-
 - job-template:
     # Job template for building & pushing docker images
     #
@@ -59,31 +83,10 @@
     #  1. login to the docker registry
     #  2. run a specified shell builder
     #
-
     name: '{project-name}-{stream}-docker-c-shell-daily'
-    project-type: freestyle
+    id: gerrit-docker-c-shell-daily
+    <<: *c_job_common
     node: 'ubuntu1604-docker-8c-8g'
-    disabled: false
-    properties:
-      - infra-properties:
-          build-days-to-keep: '{build-days-to-keep}'
-
-    parameters:
-      - infra-parameters:
-          project: '{project}'
-          branch: '{branch}'
-          refspec: 'refs/heads/{branch}'
-          artifacts: '{archive-artifacts}'
-
-    scm:
-      - gerrit-trigger-scm:
-          refspec: ''
-          choosing-strategy: 'default'
-          submodule-recursive: '{submodule-recursive}'
-
-    wrappers:
-      - infra-wrappers:
-          build-timeout: '{build-timeout}'
 
     triggers:
       # 12 AM UTC
@@ -100,7 +103,3 @@
           settings-file: '{mvn-settings}'
       - docker-login
       - shell: '{script}'
-
-    publishers:
-      - infra-shiplogs:
-          maven-version: '{maven-version}'
diff --git a/jjb/global-templates-docker.yaml b/jjb/global-templates-docker.yaml
index db3d4cf..1c8242f 100644
--- a/jjb/global-templates-docker.yaml
+++ b/jjb/global-templates-docker.yaml
@@ -24,6 +24,7 @@
     # Default to LF standard 'snapshots' docker registry
     docker_registry: '$DOCKER_REGISTRY:10003'
     docker_tag: 'latest'
+    submodule-disable: false
     submodule-timeout: 10
 
     #####################
@@ -280,6 +281,7 @@
           branch: '$GERRIT_BRANCH'
           submodule-recursive: true
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: default
 
     builders:
@@ -340,6 +342,7 @@
           branch: '$GERRIT_BRANCH'
           submodule-recursive: true
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: default
 
     builders:
@@ -560,6 +563,7 @@
           branch: '$GERRIT_BRANCH'
           submodule-recursive: true
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: default
 
     builders:
@@ -620,6 +624,7 @@
           branch: '$GERRIT_BRANCH'
           submodule-recursive: true
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: default
 
     builders:
@@ -677,6 +682,7 @@
           branch: '$GERRIT_BRANCH'
           submodule-recursive: true
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: default
 
     builders:
@@ -729,6 +735,7 @@
           branch: '$GERRIT_BRANCH'
           submodule-recursive: true
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: default
 
     builders:
diff --git a/jjb/global-templates-helm.yaml b/jjb/global-templates-helm.yaml
index f5c6bcd..12ce9a3 100644
--- a/jjb/global-templates-helm.yaml
+++ b/jjb/global-templates-helm.yaml
@@ -17,6 +17,7 @@
     git-url: '$GIT_URL/$PROJECT'
     post_build_script: ''
     pre_build_script: ''
+    submodule-disable: false
     submodule-recursive: true
     submodule-timeout: 10
 
@@ -129,6 +130,7 @@
           branch: '$GERRIT_BRANCH'
           submodule-recursive: '{submodule-recursive}'
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: default
 
     triggers:
@@ -168,6 +170,7 @@
           branch: '$GERRIT_BRANCH'
           submodule-recursive: '{submodule-recursive}'
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: default
 
     triggers:
@@ -272,6 +275,7 @@
           branch: '$GERRIT_BRANCH'
           submodule-recursive: true
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: default
 
     builders:
diff --git a/jjb/integration/integration.yaml b/jjb/integration/integration.yaml
index 6ed067e..714878e 100644
--- a/jjb/integration/integration.yaml
+++ b/jjb/integration/integration.yaml
@@ -11,7 +11,12 @@
     jobs:
       - '{project-name}-{stream}-{subproject}-verify-java'
       - '{project-name}-{stream}-{subproject}-merge-java'
-      - '{project-name}-{stream}-{subproject}-release-version-java-daily'
+      - gerrit-maven-stage:
+          sign-artifacts: true
+          build-node: centos7-builder-4c-4g
+          maven-versions-plugin: true
+          mvn-pom: 'version-manifest/pom.xml'
+          mvn-params: '-f version-manifest/pom.xml'
     project: 'integration'
     subproject:
       - 'version-manifest':
diff --git a/jjb/onap-jjb/onap-pypi-template.yaml b/jjb/onap-jjb/onap-pypi-template.yaml
index e526603..9de048c 100644
--- a/jjb/onap-jjb/onap-pypi-template.yaml
+++ b/jjb/onap-jjb/onap-pypi-template.yaml
@@ -20,6 +20,7 @@
       - compare-type: ANT
         pattern: '**'
 
+    submodule-disable: false
     submodule-timeout: 10
 
     #####################
@@ -52,6 +53,7 @@
           branch: '$GERRIT_BRANCH'
           submodule-recursive: true
           submodule-timeout: '{submodule-timeout}'
+          submodule-disable: '{submodule-disable}'
           choosing-strategy: default
 
     wrappers:
diff --git a/jjb/optf/optf-cmso.yaml b/jjb/optf/optf-cmso.yaml
index 8b495ff..5b240f4 100644
--- a/jjb/optf/optf-cmso.yaml
+++ b/jjb/optf/optf-cmso.yaml
@@ -17,10 +17,6 @@
          mvn_properties:
             - docker.pull.registry=nexus3.onap.org:10001
             - docker.push.registry=nexus3.onap.org:10003
-      - '{project-name}-{stream}-release-java-daily-checkstyle':
-         setVersion: 'DoSetVersion'
-         mvn_properties:
-          - docker.pull.registry=nexus3.onap.org:10001
       - '{project-name}-{stream}-docker-java-properties-daily':
          setVersion: 'DoSetVersion'
          docker-pom: 'pom.xml'
diff --git a/jjb/optf/optf-has.yaml b/jjb/optf/optf-has.yaml
index 314ec33..50a8035 100644
--- a/jjb/optf/optf-has.yaml
+++ b/jjb/optf/optf-has.yaml
@@ -21,7 +21,6 @@
           sign-artifacts: true
           build-node: centos7-docker-8c-8g
           maven-versions-plugin: true
-      - '{project-name}-{stream}-{subproject}-release-version-java-daily'
     files: '**'
     archive-artifacts: ''
     build-node: 'ubuntu1604-builder-4c-4g'
diff --git a/jjb/optf/optf-osdf.yaml b/jjb/optf/optf-osdf.yaml
index 1908941..0949850 100644
--- a/jjb/optf/optf-osdf.yaml
+++ b/jjb/optf/optf-osdf.yaml
@@ -20,7 +20,6 @@
           sign-artifacts: true
           build-node: centos7-docker-8c-8g
           maven-versions-plugin: true
-      - '{project-name}-{stream}-{subproject}-release-version-java-daily'
     files: '**'
     archive-artifacts: ''
     build-node: 'ubuntu1604-builder-4c-4g'
diff --git a/jjb/vid/vid-csit.yaml b/jjb/vid/vid-csit.yaml
index c4643e5..23afa74 100644
--- a/jjb/vid/vid-csit.yaml
+++ b/jjb/vid/vid-csit.yaml
@@ -8,8 +8,6 @@
     stream:
       - 'master':
           branch: 'master'
-      - 'casablanca':
-          branch: 'casablanca'
     functionality:
       - 'healthCheck':
           trigger_jobs: '{project-name}-{stream}-docker-version-java-daily'
diff --git a/jjb/vid/vid.yaml b/jjb/vid/vid.yaml
index d3ffe68..3b812c7 100644
--- a/jjb/vid/vid.yaml
+++ b/jjb/vid/vid.yaml
@@ -11,6 +11,10 @@
     jobs:
       - '{project-name}-{stream}-verify-java'
       - '{project-name}-{stream}-merge-java'
+      - gerrit-maven-stage:
+          sign-artifacts: true
+          build-node: centos7-builder-4c-4g
+          maven-versions-plugin: true
       - '{project-name}-{stream}-release-version-java-daily':
           mvn-params: '-Dmaven.test.skip=true'
     project: 'vid'