BjornMagnussonXA | d3104ef | 2019-03-26 12:48:46 +0000 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | #Stop all running containers |
| 4 | docker kill "$(docker ps -q -a)" |
| 5 | docker rm "$(docker ps -q -a)" |
| 6 | |
BjornMagnussonXA | 90b0974 | 2019-04-16 12:10:40 +0000 | [diff] [blame] | 7 | # Clone Simulators for DFC from integration repo. |
BjornMagnussonXA | d3104ef | 2019-03-26 12:48:46 +0000 | [diff] [blame] | 8 | mkdir -p $WORKSPACE/archives/dfc |
| 9 | cd $WORKSPACE/archives/dfc |
BjornMagnussonXA | 90b0974 | 2019-04-16 12:10:40 +0000 | [diff] [blame] | 10 | git clone --depth 1 https://gerrit.onap.org/r/integration -b master |
BjornMagnussonXA | d3104ef | 2019-03-26 12:48:46 +0000 | [diff] [blame] | 11 | |
| 12 | #Location of all individual simulators for DFC |
| 13 | SIM_ROOT=$WORKSPACE/archives/dfc/integration/test/mocks/datafilecollector-testharness |
| 14 | #Location of the above simulators when run as a group. For start+config and stop. |
| 15 | SIMGROUP_ROOT=$SIM_ROOT/simulator-group |
| 16 | |
| 17 | #Default IP for all containers |
| 18 | SIM_IP="127.0.0.1" |
| 19 | #Location of script to start and stop dfc |
| 20 | DFC_ROOT=$WORKSPACE/scripts/dcaegen2-collectors-datafile/dfc-management |
| 21 | |
| 22 | #Make the env vars availble to the robot scripts |
| 23 | ROBOT_VARIABLES="-v SIMGROUP_ROOT:${SIMGROUP_ROOT} -v SIM_IP:${SIM_IP} -v DFC_ROOT:${DFC_ROOT}" |
| 24 | |
| 25 | #Build needed simulator images. DR and MR simulators |
| 26 | |
| 27 | cd $SIM_ROOT/mr-sim |
| 28 | |
| 29 | docker build -t mrsim:latest . |
| 30 | |
| 31 | cd $SIM_ROOT/dr-sim |
| 32 | |
| 33 | docker build -t drsim_common:latest . |
| 34 | |
| 35 | #Prepare the ftp simulator files. |
| 36 | |
| 37 | cd $SIMGROUP_ROOT |
| 38 | |
| 39 | #Copy ftp config for the ftp servers |
| 40 | cp -r ../ftps-sftp-server/configuration . |
| 41 | cp -r ../ftps-sftp-server/tls . |
| 42 | |
| 43 | #All containers will be started and stopped via the robot tests. |
| 44 | |