Add a separate job for the release build

Change-Id: Ie29f29cfa4b1aaf0b0efe2e3993f337f26548780
diff --git a/jjb/onos/onos-release-build-verify.sh b/jjb/onos/onos-release-build-verify.sh
index 6da38b7..f521897 100644
--- a/jjb/onos/onos-release-build-verify.sh
+++ b/jjb/onos/onos-release-build-verify.sh
@@ -4,12 +4,5 @@
 ONOS_ROOT=`pwd`
 . tools/build/envDefaults
 
-env
-
-# set up release build credentials
-. onos-build-credentials
-
-env
-
-# run the build
-#onos-build-and-upload 1.12.0-testbuild 1.12-SNAPSHOT master --dry-run
+# run the verification build
+onos-build-and-upload 1.12.0-testbuild 1.12-SNAPSHOT master --dry-run
diff --git a/jjb/onos/onos-release-build.sh b/jjb/onos/onos-release-build.sh
new file mode 100644
index 0000000..f414626
--- /dev/null
+++ b/jjb/onos/onos-release-build.sh
@@ -0,0 +1,15 @@
+#!/bin/bash -ex
+
+# set up ONOS build environment
+ONOS_ROOT=`pwd`
+. tools/build/envDefaults
+
+env
+
+# set up release build credentials
+. onos-build-credentials
+
+env
+
+# run the build
+onos-build-and-upload ${ONOS_VERSION} ${ONOS_NEXT_VERSION} ${GERRIT_BRANCH}
diff --git a/jjb/onos/onos-verify.yaml b/jjb/onos/onos-verify.yaml
index 65dd526..a8395fb 100644
--- a/jjb/onos/onos-verify.yaml
+++ b/jjb/onos/onos-verify.yaml
@@ -183,10 +183,6 @@
     <<: *daily_boiler_plate
 
     builders:
-      - config-file-provider:
-          files:
-            - file-id: 'onos-build-credentials'
-              variable: 'CREDENTIALS_FILE'
 
     #put shell scripts in file then make sure shell check is installed on verify vms
       - shell: !include-raw-escape: onos-release-build-verify.sh
@@ -195,6 +191,40 @@
 
 - job-template:
     #default name is global
+    name: 'onos-release-build'
+
+    # Job template for Java release jobs
+    #
+
+    <<: *job_boiler_plate
+    # yamllint disable-line rule:key-duplicates
+    <<: *daily_boiler_plate
+
+    parameters:
+      - string:
+         name: ONOS_VERSION
+         default: '1.12'
+         description: 'Version of ONOS to build'
+
+      - string:
+         name: ONOS_NEXT_VERSION
+         default: '1.13.0-SNAPSHOT'
+         description: 'Version of ONOS to build'
+
+    builders:
+      - config-file-provider:
+          files:
+            - file-id: 'onos-build-credentials'
+              target: 'onos-build-credentials'
+              variable: 'CREDENTIALS_FILE'
+
+    #put shell scripts in file then make sure shell check is installed on verify vms
+      - shell: !include-raw-escape: onos-release-build.sh
+      # JJB 1.6.2 does not support parameter expansion on filename?
+      #- shell: !include-raw-escape: {project-name}-verify.sh
+
+- job-template:
+    #default name is global
     name: 'onos-{stream}-maven-verify'
 
     <<: *job_boiler_plate
@@ -309,3 +339,16 @@
     jobs:
       - 'onos-{stream}-sonar'
 
+- project:
+    name: onos-release-build
+    project-name: onos-release-build
+    project: onos
+
+    build-timeout: '1800'
+    build-node: 'ubuntu16.04-basebuild-8c-15g'
+
+    stream:
+      - 'master'
+
+    jobs:
+      - 'onos-release-build'