blob: aa2b431e43f69cfc4ccf460cf6631da97d660503 [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
# set up release build credentials
. onos-build-credentials
# get the sources
git checkout $GERRIT_BRANCH
# 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}