X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=plans%2Fdcaegen2-collectors-datafile%2FFunctional-suite%2Fsetup.sh;h=e85c0eea66dc90d3bdc56e1193072d04eb642551;hb=58ef91d47cc1f9d03b2324f537ecd4543d149197;hp=e494028096a87538ee583f59dac6a3576a94f141;hpb=2201af3921058d168581b2a0d9c8ce276efecde6;p=integration%2Fcsit.git diff --git a/plans/dcaegen2-collectors-datafile/Functional-suite/setup.sh b/plans/dcaegen2-collectors-datafile/Functional-suite/setup.sh index e4940280..e85c0eea 100644 --- a/plans/dcaegen2-collectors-datafile/Functional-suite/setup.sh +++ b/plans/dcaegen2-collectors-datafile/Functional-suite/setup.sh @@ -3,14 +3,25 @@ #Stop all running containers docker kill "$(docker ps -q -a)" docker rm "$(docker ps -q -a)" +docker system prune -f -# Clone Simulators for DFC from integration repo. +# Clone Simulators for DFC from integration repo. mkdir -p $WORKSPACE/archives/dfc cd $WORKSPACE/archives/dfc -git clone --depth 1 https://gerrit.onap.org/r/integration -b master #How to make this version controlled for Dublin, El Alto etc etc -#Location of all individual simulators for DFC -SIM_ROOT=$WORKSPACE/archives/dfc/integration/test/mocks/datafilecollector-testharness + +if [ -z "$SIM_ROOT" ] +then + git clone --depth 1 https://gerrit.onap.org/r/integration -b master + #Location of all individual simulators for DFC + echo "Determine SIM_ROOT based on the WORKSPACE" + SIM_ROOT=$WORKSPACE/archives/dfc/integration/test/mocks/datafilecollector-testharness + + rm $SIM_ROOT/simulator-group/consul/consul/cbs_localhost_config.hcl || true +else + echo "Using SIM_ROOT from environmental variable: " $SIM_ROOT +fi + #Location of the above simulators when run as a group. For start+config and stop. SIMGROUP_ROOT=$SIM_ROOT/simulator-group @@ -20,7 +31,11 @@ SIM_IP="127.0.0.1" DFC_ROOT=$WORKSPACE/scripts/dcaegen2-collectors-datafile/dfc-management #Make the env vars availble to the robot scripts -ROBOT_VARIABLES="-v SIMGROUP_ROOT:${SIMGROUP_ROOT} -v SIM_IP:${SIM_IP} -v DFC_ROOT:${DFC_ROOT}" +ROBOT_VARIABLES="-b debug.log -v SIMGROUP_ROOT:${SIMGROUP_ROOT} -v SIM_IP:${SIM_IP} -v DFC_ROOT:${DFC_ROOT}" + + + + #Build needed simulator images. DR and MR simulators @@ -37,8 +52,11 @@ docker build -t drsim_common:latest . cd $SIMGROUP_ROOT #Copy ftp config for the ftp servers -cp -r ../ftps-sftp-server/configuration . -cp -r ../ftps-sftp-server/tls . +cp -r ../ftpes-sftp-server/configuration . +cp -r ../ftpes-sftp-server/tls . + +cd ../ftpes-sftp-server +docker build -t ftpes_vsftpd:latest -f Dockerfile-ftpes . #All containers will be started and stopped via the robot tests.