2f9438be26ebd7c962d919aeee26e63c1a7da886
[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 "$0")"; pwd)
7
8 export M=/tmp/milestones
9 export SEBAVALUE=
10 export WORKSPACE=${HOME}
11
12 # Using opencord automation-tools from the cord-6.1 maintenance branch
13 AUTO_TOOLS="${WORKSPACE}/automation-tools"
14 AUTO_TOOLS_REPO="https://github.com/iecedge/automation-tools.git"
15 AUTO_TOOLS_REV=${AUTO_TOOLS_VER:-cord-7.0-arm64}
16
17 rm -rf "${M}"
18 mkdir -p "${M}" "${WORKSPACE}/cord/test"
19
20 # Update helm-charts submdule needed later
21 # ignore subproject commit and use latest remote version
22 git submodule update --init --remote "${basepath}/../../src_repo/helm-charts"
23
24 test -d "${AUTO_TOOLS}" || git clone "${AUTO_TOOLS_REPO}" "${AUTO_TOOLS}"
25 (cd "${AUTO_TOOLS}"; git checkout "${AUTO_TOOLS_REV}")
26
27 # Faking helm-charts repo clone to our own git submodule if not already there
28 CHARTS="${WORKSPACE}/cord/helm-charts"
29 test -d "${CHARTS}" || test -L "${CHARTS}" || \
30     ln -s "${basepath}/../../src_repo/helm-charts" "${CHARTS}"
31
32 cd "${AUTO_TOOLS}/seba-in-a-box"
33 # shellcheck source=/dev/null
34 . env.sh
35
36 # Now calling make, to install PONSim
37 make stable