#!/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 | |
# build and deploy the Docker image | |
DOCKER="/usr/local/bin/docker" | |
$DOCKER build -t onosproject/onos:${ONOS_VERSION} . | |
$DOCKER login --username ${DOCKERHUB_USERNAME} --password ${DOCKERHUB_PASSWORD} | |
$DOCKER push onosproject/onos:${ONOS_VERSION} | |