From e6183842b32aef15fb8d27e528ebb8cf6ff60e69 Mon Sep 17 00:00:00 2001 From: Ciprian Barbu Date: Tue, 14 Apr 2020 17:22:38 +0300 Subject: [PATCH] Fix SEBA install.sh error updating helm-charts The issue happens if the call to install.sh is made outside of the iec git repository path. Also fix the incorrect relatives paths caused by symlinking the install.sh script. Signed-off-by: Ciprian Barbu Change-Id: I56799b4311fb06ed8a2de55a7b9fd04b63a0fa82 --- src/use_cases/seba_on_arm/test/ponsim/install.sh | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/use_cases/seba_on_arm/test/ponsim/install.sh b/src/use_cases/seba_on_arm/test/ponsim/install.sh index 2f9438b..40f6875 100755 --- a/src/use_cases/seba_on_arm/test/ponsim/install.sh +++ b/src/use_cases/seba_on_arm/test/ponsim/install.sh @@ -3,26 +3,29 @@ set -ex -basepath=$(cd "$(dirname "$0")"; pwd) +basepath="$(cd "$(dirname "$(readlink -f "$0")")"; pwd)" +IEC_PATH="$(readlink -f "${basepath}/../../../../..")" +HELM_CHARTS_PATH="src/use_cases/seba_on_arm/src_repo/helm-charts" -export M=/tmp/milestones +export M="/tmp/milestones" export SEBAVALUE= -export WORKSPACE=${HOME} +export WORKSPACE="${HOME}" # Using opencord automation-tools from the cord-6.1 maintenance branch AUTO_TOOLS="${WORKSPACE}/automation-tools" AUTO_TOOLS_REPO="https://github.com/iecedge/automation-tools.git" -AUTO_TOOLS_REV=${AUTO_TOOLS_VER:-cord-7.0-arm64} +AUTO_TOOLS_REV="${AUTO_TOOLS_VER:-cord-7.0-arm64}" rm -rf "${M}" mkdir -p "${M}" "${WORKSPACE}/cord/test" # Update helm-charts submdule needed later # ignore subproject commit and use latest remote version -git submodule update --init --remote "${basepath}/../../src_repo/helm-charts" +git -C "${IEC_PATH}" submodule update --init --remote "${HELM_CHARTS_PATH}" + test -d "${AUTO_TOOLS}" || git clone "${AUTO_TOOLS_REPO}" "${AUTO_TOOLS}" -(cd "${AUTO_TOOLS}"; git checkout "${AUTO_TOOLS_REV}") +git -C "${AUTO_TOOLS}" checkout "${AUTO_TOOLS_REV}" # Faking helm-charts repo clone to our own git submodule if not already there CHARTS="${WORKSPACE}/cord/helm-charts" -- 2.16.6