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 | ||||
17 | docker build -t onosproject/onos:${ONOS_VERSION} . | ||||
18 | docker login --username ${DOCKERHUB_USERNAME} --password ${DOCKERHUB_PASSWORD} | ||||
19 | docker push onosproject/onos:${ONOS_VERSION} |