blob: 856abc9c1b1ca37bce23a325e480e64964f56608 [file] [log] [blame]
Ray Milkey0caba7f2018-01-08 12:56:18 -08001#!/bin/bash -ex
2
3# exit on errors
4set -eu -o pipefail
5
6# set up ONOS build environment
7ONOS_ROOT=`pwd`
8. tools/build/envDefaults
9
10# get the sources
11git checkout $GERRIT_BRANCH
12
13# run the build
14onos-buck build onos
15
16# build and deploy the Docker image
Ray Milkeyc0d22362018-01-08 13:51:07 -080017# build and deploy the Docker image
18DOCKER="/usr/local/bin/docker"
19$DOCKER build -t onosproject/onos:${ONOS_VERSION} .
20$DOCKER login --username ${DOCKERHUB_USERNAME} --password ${DOCKERHUB_PASSWORD}
21$DOCKER push onosproject/onos:${ONOS_VERSION}
22