aboutsummaryrefslogtreecommitdiffstats
path: root/plans/so/integration-etsi-testing/setup.sh
diff options
context:
space:
mode:
Diffstat (limited to 'plans/so/integration-etsi-testing/setup.sh')
-rwxr-xr-xplans/so/integration-etsi-testing/setup.sh33
1 files changed, 28 insertions, 5 deletions
diff --git a/plans/so/integration-etsi-testing/setup.sh b/plans/so/integration-etsi-testing/setup.sh
index 25e7ee76..75e75275 100755
--- a/plans/so/integration-etsi-testing/setup.sh
+++ b/plans/so/integration-etsi-testing/setup.sh
@@ -26,7 +26,11 @@ MAVEN_TAR_LOCATION="http://apache.claz.org/maven/maven-3/3.3.9/binaries/$MAVEN_T
SCRIPT_HOME="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
SCRIPT_NAME=$(basename $0)
+CONFIG_DIR=$SCRIPT_HOME/config
+ENV_FILE=$CONFIG_DIR/env
TEMP_DIR_PATH=$SCRIPT_HOME/temp
+TEST_LAB_DIR_PATH=$TEMP_DIR_PATH/test_lab
+DOCKER_COMPOSE_FILE_PATH=$SCRIPT_HOME/docker-compose.yml
MAVEN_DIR=$TEMP_DIR_PATH/maven
INSTALLED_MAVEN_DIR=$MAVEN_DIR/$MAVEN_VERSION_DIR
@@ -38,6 +42,8 @@ SIMULATOR_MAVEN_PROJECT_POM="$SCRIPT_HOME/so-simulators/pom.xml"
echo "Running $SCRIPT_HOME/$SCRIPT_NAME ..."
+export $(egrep -v '^#' $ENV_FILE | xargs)
+
if [[ ! "$TEMP_DIR_PATH" || ! -d "$TEMP_DIR_PATH" ]]; then
echo "Creating temporary directory $TEMP_DIR_PATH"
mkdir $TEMP_DIR_PATH
@@ -99,13 +105,30 @@ cd $SCRIPT_HOME
echo "Will build simulator project using $MVN_CLEAN_INSTALL -f $SIMULATOR_MAVEN_PROJECT_POM --settings $MVN_SETTINGS_XML"
$MVN_CLEAN_INSTALL -f $SIMULATOR_MAVEN_PROJECT_POM --settings $MVN_SETTINGS_XML
-export NEXUS_DOCKER_REPO_MSO=nexus3.onap.org:10001
-export TAG=1.4.0-STAGING-latest
+if [ $? -ne 0 ]; then
+ echo "Maven build failed"
+ exit 1
+fi
+
+echo "Will clone docker-config project ... "
+
+
+if [[ -d "$TEST_LAB_DIR_PATH" ]]; then
+ echo "$TEST_LAB_DIR_PATH already exists"
+ echo "Removing $TEST_LAB_DIR_PATH directory ..."
+ rm -rf $TEST_LAB_DIR_PATH
+fi
+
+git clone http://gerrit.onap.org/r/so/docker-config.git $TEST_LAB_DIR_PATH
+
+
+export TEST_LAB_DIR=$TEST_LAB_DIR_PATH
+export CONFIG_DIR_PATH=$CONFIG_DIR
-docker-compose up -d
+docker-compose -f $DOCKER_COMPOSE_FILE_PATH up -d
-echo "Sleeping for 2m"
-sleep 2m
+echo "Sleeping for 3m"
+sleep 3m
REPO_IP='127.0.0.1'
ROBOT_VARIABLES="-v REPO_IP:${REPO_IP}"