Add job for bazel release build
Change-Id: Iaa55c3e0bc927574b02b622d96b75f728a515ac5
diff --git a/jjb/onos/onos-bazel-release-build.sh b/jjb/onos/onos-bazel-release-build.sh
new file mode 100644
index 0000000..8d488b8
--- /dev/null
+++ b/jjb/onos/onos-bazel-release-build.sh
@@ -0,0 +1,48 @@
+#!/bin/bash -e
+
+# exit on errors
+set -eu -o pipefail
+
+# set up ONOS build environment
+ONOS_ROOT=`pwd`
+. tools/build/envDefaults
+
+# import GPG key
+gpg --import jenkins.key
+
+# set up release build credentials
+. onos-build-credentials
+
+# configure git settings
+git config user.email "jenkins@onlab.us"
+git config user.name "ONOS Jenkins User"
+
+# install boto
+pip install -U boto
+
+# stage the maven settings
+mkdir -p ~/.m2
+mv settings.xml ~/.m2/settings.xml
+
+# stage and add the build SSH key
+chmod 600 id_rsa.pub
+ssh-add id_rsa.pub
+
+# Add the javadoc server to the list of known hosts
+ssh-keyscan -H -t rsa api.onosproject.org >>~/.ssh/known_hosts
+
+# set user to use for uploading javadocs
+WIKI_USER="jenkins"
+export WIKI_USER
+
+# lock gerrit to prevent checkins
+ssh -p 29418 gerrit.onosproject.org projectlock lock onos ${GERRIT_BRANCH}
+
+# unlock on exit
+trap "ssh -p 29418 gerrit.onosproject.org projectlock unlock onos ${GERRIT_BRANCH}" EXIT
+
+# get the sources
+git checkout $GERRIT_BRANCH
+
+# 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 efb3767..13e52e0 100644
--- a/jjb/onos/onos-verify.yaml
+++ b/jjb/onos/onos-verify.yaml
@@ -483,6 +483,41 @@
- job-template:
#default name is global
+ name: 'onos-bazel-release-build'
+
+ # Job template for Java release jobs
+ #
+
+ <<: *job_boiler_plate
+ # yamllint disable-line rule:key-duplicates
+ <<: *release_build_boiler_plate
+
+ builders:
+ - lf-provide-maven-settings:
+ settings-file: 'release-build-maven-settings'
+ global-settings-file: 'release-build-maven-settings'
+ - config-file-provider:
+ files:
+ - file-id: 'onos-build-credentials'
+ target: 'onos-build-credentials'
+ variable: 'CREDENTIALS_FILE'
+ - file-id: 'gpg-key'
+ target: 'jenkins.key'
+ variable: 'GPG_KEY_FILE'
+ - file-id: 'release-build-maven-settings'
+ target: 'settings.xml'
+ variable: 'MAVEN_SETTINGS'
+ - file-id: 'api-onosproject-ssh-key'
+ target: 'id_rsa.pub'
+ variable: 'API_ONOSPROJECT_SSH_KEY'
+
+ #put shell scripts in file then make sure shell check is installed on verify vms
+ - shell: !include-raw-escape: onos-bazel-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-docker-build'
# Job template for Docker jobs
@@ -735,6 +770,19 @@
- 'onos-release-build'
- project:
+ name: onos-bazel-release-build
+ project-name: onos-bazel-release-build
+ project: onos
+
+ build-timeout: '240'
+ build-node: 'ubuntu16.04-basebuild-8c-15g'
+
+ stream: 'master'
+
+ jobs:
+ - 'onos-bazel-release-build'
+
+- project:
name: onos-docker-build
project-name: onos-docker-build
project: onos