blob: 2d276e513a0e4e4d3f3c3251cca0ff802f134386 [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)"
TamasBakaie81736c2019-08-23 13:31:57 +00006docker system prune -f
BjornMagnussonXAd3104ef2019-03-26 12:48:46 +00007
BjornMagnussonXA90b09742019-04-16 12:10:40 +00008# Clone Simulators for DFC from integration repo.
BjornMagnussonXAd3104ef2019-03-26 12:48:46 +00009mkdir -p $WORKSPACE/archives/dfc
10cd $WORKSPACE/archives/dfc
BjornMagnussonXAd3104ef2019-03-26 12:48:46 +000011
TamasBakaie81736c2019-08-23 13:31:57 +000012
13if [ -z "$SIM_ROOT" ]
14then
15 #git clone --depth 1 https://gerrit.onap.org/r/integration -b master
16 git clone https://github.com/yanhuanwang/integration.git
17 #Location of all individual simulators for DFC
18 echo "Determine SIM_ROOT based on the WORKSPACE"
19 SIM_ROOT=$WORKSPACE/archives/dfc/integration/test/mocks/datafilecollector-testharness
20
21 rm $SIM_ROOT/simulator-group/consul/consul/cbs_localhost_config.hcl || true
22else
23 echo "Using SIM_ROOT from environmental variable: " $SIM_ROOT
24fi
25
BjornMagnussonXAd3104ef2019-03-26 12:48:46 +000026#Location of the above simulators when run as a group. For start+config and stop.
27SIMGROUP_ROOT=$SIM_ROOT/simulator-group
28
29#Default IP for all containers
30SIM_IP="127.0.0.1"
31#Location of script to start and stop dfc
32DFC_ROOT=$WORKSPACE/scripts/dcaegen2-collectors-datafile/dfc-management
33
34#Make the env vars availble to the robot scripts
TamasBakaie81736c2019-08-23 13:31:57 +000035ROBOT_VARIABLES="-b debug.log -v SIMGROUP_ROOT:${SIMGROUP_ROOT} -v SIM_IP:${SIM_IP} -v DFC_ROOT:${DFC_ROOT}"
36
37
38
39
BjornMagnussonXAd3104ef2019-03-26 12:48:46 +000040
41#Build needed simulator images. DR and MR simulators
42
43cd $SIM_ROOT/mr-sim
44
45docker build -t mrsim:latest .
46
47cd $SIM_ROOT/dr-sim
48
49docker build -t drsim_common:latest .
50
51#Prepare the ftp simulator files.
52
53cd $SIMGROUP_ROOT
54
55#Copy ftp config for the ftp servers
56cp -r ../ftps-sftp-server/configuration .
57cp -r ../ftps-sftp-server/tls .
58
TamasBakaie81736c2019-08-23 13:31:57 +000059cd ../ftps-sftp-server
60docker build -t ftps_vsftpd:latest -f Dockerfile-ftps .
61
62
BjornMagnussonXAd3104ef2019-03-26 12:48:46 +000063#All containers will be started and stopped via the robot tests.
64