2 # shellcheck disable=SC2016
6 basepath="$(cd "$(dirname "$(readlink -f "$0")")"; pwd)"
8 IEC_PATH="$(readlink -f "$(git -C "${basepath}" rev-parse --show-toplevel)")"
9 HELM_CHARTS_PATH="src/use_cases/seba_on_arm/src_repo/helm-charts"
10 HELM_CHARTS_REV_IEC="cord-7.0-arm64"
11 HELM_CHARTS_REV_REC="cord-7.0-arm64-rec"
12 UPSTREAM_PROJECT="${UPSTREAM_PROJECT:-iec}"
14 if [ "$#" -gt 0 ]; then UPSTREAM_PROJECT="$1"; fi
16 case "${UPSTREAM_PROJECT}" in
18 HELM_CHARTS_REV="${HELM_CHARTS_REV_IEC}"
21 HELM_CHARTS_REV="${HELM_CHARTS_REV_REC}"
24 echo "Invalid upstream project ${UPSTREAM_PROJECT}"
25 echo " Specify either iec or rec"
30 export M="/tmp/milestones"
32 export WORKSPACE="${HOME}"
33 export HELM_CHARTS_REV
35 # Using opencord automation-tools from the cord-6.1 maintenance branch
36 AUTO_TOOLS="${WORKSPACE}/automation-tools"
37 AUTO_TOOLS_REPO="https://github.com/iecedge/automation-tools.git"
38 AUTO_TOOLS_REV="${AUTO_TOOLS_VER:-cord-7.0-arm64}"
41 mkdir -p "${M}" "${WORKSPACE}/cord/test"
43 # Update helm-charts submdule needed later
44 # ignore subproject commit and use latest remote version
45 git -C "${IEC_PATH}" submodule update --init --remote "${HELM_CHARTS_PATH}"
46 git -C "${IEC_PATH}/${HELM_CHARTS_PATH}" checkout "${HELM_CHARTS_REV}"
48 test -d "${AUTO_TOOLS}" || git clone "${AUTO_TOOLS_REPO}" "${AUTO_TOOLS}"
49 git -C "${AUTO_TOOLS}" checkout "${AUTO_TOOLS_REV}"
51 # Faking helm-charts repo clone to our own git submodule if not already there
52 CHARTS="${WORKSPACE}/cord/helm-charts"
53 test -d "${CHARTS}" || test -L "${CHARTS}" || \
54 ln -s "${IEC_PATH}/${HELM_CHARTS_PATH}" "${CHARTS}"
56 cd "${AUTO_TOOLS}/seba-in-a-box"
57 # shellcheck source=/dev/null
60 # Now calling make, to install SiaB and PONSim