blob: db209e3b11170879f7d30f8f7bb4a585708cc965 [file] [log] [blame]
#!/bin/bash -ex
# exit on errors
set -eu -o pipefail
DOCKER="/usr/bin/docker"
${DOCKER} --version
# 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
# 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}