Gary Wu | 9abb61c | 2018-09-27 10:38:50 -0700 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | |
| 3 | set -euo pipefail |
| 4 | |
| 5 | if [[ $# -eq 1 ]] && [[ $1 == "local-test-run" ]]; then |
| 6 | echo "Building locally - assuming all dependencies are installed" |
| 7 | export DOCKER_REGISTRY="" |
| 8 | export DOCKER_REGISTRY_PREFIX="" |
| 9 | export WORKSPACE=$(git rev-parse --show-toplevel) |
| 10 | else |
| 11 | echo "Default run - install all dependencies" |
| 12 | |
| 13 | pip uninstall -y docker-py |
| 14 | pip install docker |
| 15 | |
| 16 | COMPOSE_VERSION=1.22.0 |
| 17 | COMPOSE_LOCATION='/usr/local/bin/docker-compose' |
| 18 | sudo curl -L https://github.com/docker/compose/releases/download/${COMPOSE_VERSION}/docker-compose-$(uname -s)-$(uname -m) -o ${COMPOSE_LOCATION} |
| 19 | sudo chmod +x ${COMPOSE_LOCATION} |
| 20 | |
| 21 | export DOCKER_REGISTRY="nexus3.onap.org:10001" |
| 22 | export DOCKER_REGISTRY_PREFIX="${DOCKER_REGISTRY}/" |
| 23 | fi |
| 24 | |
| 25 | echo "Removing not used docker networks" |
| 26 | docker network prune -f |
| 27 | |
| 28 | export CONTAINERS_NETWORK=ves-hv-default |
| 29 | echo "Creating network for containers: ${CONTAINERS_NETWORK}" |
| 30 | docker network create ${CONTAINERS_NETWORK} |
| 31 | |
| 32 | cd ssl |
| 33 | ./gen-certs.sh |
| 34 | cd .. |
| 35 | |
| 36 | docker-compose up -d |
| 37 | |
| 38 | mkdir -p ${WORKSPACE}/archives/containers_logs |
| 39 | |
Gary Wu | 13111e9 | 2018-09-27 11:31:33 -0700 | [diff] [blame] | 40 | export ROBOT_VARIABLES="--pythonpath ${WORKSPACE}/tests/dcaegen2-collectors-hv-ves/testcases/libraries" |