40f68750da39c181ee61e66dc6c47a23b88d3843
[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 "${basepath}/../../../../..")"
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
27 test -d "${AUTO_TOOLS}" || git clone "${AUTO_TOOLS_REPO}" "${AUTO_TOOLS}"
28 git -C "${AUTO_TOOLS}" checkout "${AUTO_TOOLS_REV}"
29
30 # Faking helm-charts repo clone to our own git submodule if not already there
31 CHARTS="${WORKSPACE}/cord/helm-charts"
32 test -d "${CHARTS}" || test -L "${CHARTS}" || \
33     ln -s "${basepath}/../../src_repo/helm-charts" "${CHARTS}"
34
35 cd "${AUTO_TOOLS}/seba-in-a-box"
36 # shellcheck source=/dev/null
37 . env.sh
38
39 # Now calling make, to install PONSim
40 make stable