Ray Milkey | c715f38 | 2017-11-02 11:00:32 -0700 | [diff] [blame] | 1 | #!/bin/bash -ex |
Ray Milkey | 8fae9a7 | 2017-11-17 10:03:54 -0800 | [diff] [blame] | 2 | |
Ray Milkey | cb569c3 | 2017-12-12 13:42:20 -0800 | [diff] [blame] | 3 | # exit on errors |
| 4 | set -eu -o pipefail |
| 5 | |
Ray Milkey | 8fae9a7 | 2017-11-17 10:03:54 -0800 | [diff] [blame] | 6 | # set up ONOS build environment |
Ray Milkey | c715f38 | 2017-11-02 11:00:32 -0700 | [diff] [blame] | 7 | ONOS_ROOT=`pwd` |
| 8 | . tools/build/envDefaults |
Ray Milkey | 8fae9a7 | 2017-11-17 10:03:54 -0800 | [diff] [blame] | 9 | |
Ray Milkey | 2918ab7 | 2018-08-14 16:27:52 -0700 | [diff] [blame] | 10 | PATH=$PATH:/home/jenkins/bin |
| 11 | |
Ray Milkey | 51bfa5c | 2019-07-02 12:54:56 -0700 | [diff] [blame] | 12 | # set up JDK 11 if needed |
| 13 | if [ ${GERRIT_BRANCH} == "master" -o ${GERRIT_BRANCH} == "onos-2.2" ] |
| 14 | then |
| 15 | echo Installing OPEN JDK 11 |
Zack Williams | 2c6c25e | 2019-08-29 16:31:20 -0700 | [diff] [blame] | 16 | sudo update-java-alternatives -s java-11-amazon-corretto |
Ray Milkey | 959fa7e | 2019-07-02 13:47:58 -0700 | [diff] [blame] | 17 | java -version |
Ray Milkey | 51bfa5c | 2019-07-02 12:54:56 -0700 | [diff] [blame] | 18 | else |
| 19 | echo Using default JDK |
| 20 | fi |
| 21 | |
Ray Milkey | d806ac9 | 2018-08-14 16:58:27 -0700 | [diff] [blame] | 22 | # import GPG key |
| 23 | gpg --import jenkins.key |
| 24 | |
Ray Milkey | 93c84fb | 2018-11-09 10:01:35 -0800 | [diff] [blame] | 25 | # run the verification build - versions don't matter here, artifacts are never published |
Ray Milkey | 2afc4a5 | 2017-11-17 11:01:38 -0800 | [diff] [blame] | 26 | onos-build-and-upload 1.12.0-testbuild 1.12-SNAPSHOT master --dry-run |