b6baf61ccffe41f056b16c4d63eda1f4133d20d9
[iec.git] / src / use_cases / seba_on_arm / test / ponsim / install.sh
1 #!/bin/bash
2 # shellcheck disable=SC2016
3
4 set -ex
5
6 basepath="$(cd "$(dirname "$(readlink -f "$0")")"; pwd)"
7 IEC_PATH="$(readlink -f "$(git -C "${basepath}" rev-parse --show-toplevel)")"
8 HELM_CHARTS_PATH="src/use_cases/seba_on_arm/src_repo/helm-charts"
9
10 export M="/tmp/milestones"
11 export SEBAVALUE=
12 export WORKSPACE="${HOME}"
13
14 # Using opencord automation-tools from the cord-6.1 maintenance branch
15 AUTO_TOOLS="${WORKSPACE}/automation-tools"
16 AUTO_TOOLS_REPO="https://github.com/iecedge/automation-tools.git"
17 AUTO_TOOLS_REV="${AUTO_TOOLS_VER:-cord-7.0-arm64}"
18
19 rm -rf "${M}"
20 mkdir -p "${M}" "${WORKSPACE}/cord/test"
21
22 # Update helm-charts submdule needed later
23 # ignore subproject commit and use latest remote version
24 git -C "${IEC_PATH}" submodule update --init --remote "${HELM_CHARTS_PATH}"
25
26 test -d "${AUTO_TOOLS}" || git clone "${AUTO_TOOLS_REPO}" "${AUTO_TOOLS}"
27 git -C "${AUTO_TOOLS}" checkout "${AUTO_TOOLS_REV}"
28
29 # Faking helm-charts repo clone to our own git submodule if not already there
30 CHARTS="${WORKSPACE}/cord/helm-charts"
31 test -d "${CHARTS}" || test -L "${CHARTS}" || \
32     ln -s "${IEC_PATH}/${HELM_CHARTS_PATH}" "${CHARTS}"
33
34 cd "${AUTO_TOOLS}/seba-in-a-box"
35 # shellcheck source=/dev/null
36 . env.sh
37
38 # Now calling make, to install SiaB and PONSim
39 make stable