Ray Milkey | 0caba7f | 2018-01-08 12:56:18 -0800 | [diff] [blame] | 1 | #!/bin/bash -ex |
| 2 | |
| 3 | # exit on errors |
| 4 | set -eu -o pipefail |
| 5 | |
| 6 | # set up ONOS build environment |
| 7 | ONOS_ROOT=`pwd` |
| 8 | . tools/build/envDefaults |
| 9 | |
| 10 | # get the sources |
| 11 | git checkout $GERRIT_BRANCH |
| 12 | |
| 13 | # run the build |
| 14 | onos-buck build onos |
| 15 | |
| 16 | # build and deploy the Docker image |
Ray Milkey | c0d2236 | 2018-01-08 13:51:07 -0800 | [diff] [blame^] | 17 | # build and deploy the Docker image |
| 18 | DOCKER="/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 | |