blob: 12714a24ede6492ef6a450aa4c267d0b5ef4a380 [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
git checkout -b docker $ONOS_TAG
# build and deploy the Docker image
$DOCKER build -t onosproject/onos:${ONOS_TAG} .
$DOCKER login --username ${DOCKERHUB_USERNAME} --password ${DOCKERHUB_PASSWORD}
$DOCKER push onosproject/onos:${ONOS_TAG}