diff --git a/local.sh b/local.sh index 6e9ce89..9ec12f5 100755 --- a/local.sh +++ b/local.sh @@ -158,16 +158,20 @@ EOF rm -rf reports echo "Deploy Locust application locally" + + if $AUTOMATIC; then + ABORT_ON_EXIT="--abort-on-container-exit" + else + echo "Getting the Locust application ready on http://:8089" + fi + (export IMAGE=$IMAGE && export TARGET_HOST=$TARGET && export LOCUST_FILE=$LOCUST_FILE && export SLAVE_NUM=$SLAVES && export AUTOMATIC=$AUTOMATIC && export USERS=$USERS && export HATCH_RATE=$HATCH_RATE && export DURATION=$DURATION && export OAUTH=$OAUTH && URL=$URL && export SEND_ANONYMOUS_USAGE_INFO=$KPI && - export SCOPES=$SCOPES && export BUILD_URL=$BUILD_URL && docker-compose up --abort-on-container-exit) + export SCOPES=$SCOPES && export BUILD_URL=$BUILD_URL && docker-compose up $ABORT_ON_EXIT) if $AUTOMATIC; then - sleep $DURATION docker cp docker_locusts_controller:/opt/reports . - else - echo "Locust application is successfully deployed. you can access http://:8089" fi else