blob: e494028096a87538ee583f59dac6a3576a94f141 [file] [log] [blame]
BjornMagnussonXAd3104ef2019-03-26 12:48:46 +00001#!/bin/bash
2
3#Stop all running containers
4docker kill "$(docker ps -q -a)"
5docker rm "$(docker ps -q -a)"
6
7# Clone Simulators for DFC from integration repo.
8mkdir -p $WORKSPACE/archives/dfc
9cd $WORKSPACE/archives/dfc
10git clone --depth 1 https://gerrit.onap.org/r/integration -b master #How to make this version controlled for Dublin, El Alto etc etc
11
12#Location of all individual simulators for DFC
13SIM_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.
15SIMGROUP_ROOT=$SIM_ROOT/simulator-group
16
17#Default IP for all containers
18SIM_IP="127.0.0.1"
19#Location of script to start and stop dfc
20DFC_ROOT=$WORKSPACE/scripts/dcaegen2-collectors-datafile/dfc-management
21
22#Make the env vars availble to the robot scripts
23ROBOT_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
27cd $SIM_ROOT/mr-sim
28
29docker build -t mrsim:latest .
30
31cd $SIM_ROOT/dr-sim
32
33docker build -t drsim_common:latest .
34
35#Prepare the ftp simulator files.
36
37cd $SIMGROUP_ROOT
38
39#Copy ftp config for the ftp servers
40cp -r ../ftps-sftp-server/configuration .
41cp -r ../ftps-sftp-server/tls .
42
43#All containers will be started and stopped via the robot tests.
44