blob: 15c1f9d9a0256de5bed09503782bc9718b8280c4 [file] [log] [blame]
#!/bin/bash -ex
# exit on errors
set -eu -o pipefail
# set up ONOS build environment
ONOS_ROOT=`pwd`
. tools/build/envDefaults
# get the sources
git checkout $GERRIT_BRANCH
# run the build
onos-buck build onos
# build and deploy the Docker image
docker build -t onosproject/onos:${ONOS_VERSION} .
docker login --username ${DOCKERHUB_USERNAME} --password ${DOCKERHUB_PASSWORD}
docker push onosproject/onos:${ONOS_VERSION}