blob: 22898b27b26f9f5bfc156a2e7531ccd1cf69000c [file] [log] [blame]
#!/bin/bash -ex
# exit on errors
set -eu -o pipefail
# set up ONOS build environment
ONOS_ROOT=`pwd`
. tools/build/envDefaults
PATH=$PATH:/home/jenkins/bin
# set up JDK 11 if needed
if [ ${GERRIT_BRANCH} == "master" -o ${GERRIT_BRANCH} == "onos-2.2" ]
then
echo Installing OPEN JDK 11
sudo update-alternatives --set java /usr/lib/jvm/java-11-amazon-corretto/bin/java
sudo update-alternatives --set javac /usr/lib/jvm/java-11-amazon-corretto/bin/javac
java -version
else
echo Using default JDK
fi
# import GPG key
gpg --import jenkins.key
# run the verification build - versions don't matter here, artifacts are never published
onos-build-and-upload 1.12.0-testbuild 1.12-SNAPSHOT master --dry-run