blob: b6fa1125ed7a9bb6b18216edc8c2148975857757 [file] [log] [blame]
Ray Milkeyc715f382017-11-02 11:00:32 -07001#!/bin/bash -ex
Ray Milkey8fae9a72017-11-17 10:03:54 -08002
Ray Milkeycb569c32017-12-12 13:42:20 -08003# exit on errors
4set -eu -o pipefail
5
Ray Milkey8fae9a72017-11-17 10:03:54 -08006# set up ONOS build environment
Ray Milkeyc715f382017-11-02 11:00:32 -07007ONOS_ROOT=`pwd`
8. tools/build/envDefaults
Ray Milkey8fae9a72017-11-17 10:03:54 -08009
Ray Milkey2918ab72018-08-14 16:27:52 -070010PATH=$PATH:/home/jenkins/bin
11
Ray Milkey51bfa5c2019-07-02 12:54:56 -070012# set up JDK 11 if needed
13if [ ${GERRIT_BRANCH} == "master" -o ${GERRIT_BRANCH} == "onos-2.2" ]
14then
15 echo Installing OPEN JDK 11
Ray Milkey959fa7e2019-07-02 13:47:58 -070016 curl -L -o jdk.tar.gz -s https://cdn.azul.com/zulu/bin/zulu11.31.11-ca-jdk11.0.3-linux_x64.tar.gz
17 tar xf jdk.tar.gz
18 export JAVA_HOME="`pwd`/zulu11.31.11-ca-jdk11.0.3-linux_x64"
19 PATH="$JAVA_HOME/bin:$PATH"
20 java -version
Ray Milkey51bfa5c2019-07-02 12:54:56 -070021else
22 echo Using default JDK
23fi
24
Ray Milkeyd806ac92018-08-14 16:58:27 -070025# import GPG key
26gpg --import jenkins.key
27
Ray Milkey93c84fb2018-11-09 10:01:35 -080028# run the verification build - versions don't matter here, artifacts are never published
Ray Milkey2afc4a52017-11-17 11:01:38 -080029onos-build-and-upload 1.12.0-testbuild 1.12-SNAPSHOT master --dry-run