blob: 4169af01a933e28d5218945dd542275bbac429fe [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
Zack Williams2c6c25e2019-08-29 16:31:20 -070016 sudo update-java-alternatives -s java-11-amazon-corretto
Ray Milkey959fa7e2019-07-02 13:47:58 -070017 java -version
Ray Milkey51bfa5c2019-07-02 12:54:56 -070018else
19 echo Using default JDK
20fi
21
Ray Milkeyd806ac92018-08-14 16:58:27 -070022# import GPG key
23gpg --import jenkins.key
24
Ray Milkey93c84fb2018-11-09 10:01:35 -080025# run the verification build - versions don't matter here, artifacts are never published
Ray Milkey2afc4a52017-11-17 11:01:38 -080026onos-build-and-upload 1.12.0-testbuild 1.12-SNAPSHOT master --dry-run