From: Ciprian Barbu Date: Thu, 16 Jul 2020 06:20:15 +0000 (+0300) Subject: Clone missing iec repo if not found X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=commitdiff_plain;h=3609c7017536705f831ce25d5ead72828ee8224d;p=ci-management.git Clone missing iec repo if not found Make sure iec repo is present for rec clusters. At the same time, make sure K8S_MASTER_IP is exported in the ssh session shell when running the install script Signed-off-by: Ciprian Barbu Change-Id: I962359fc954198912faf589bee20c6f528b4875d --- diff --git a/jjb/shell/seba_on_arm.sh b/jjb/shell/seba_on_arm.sh index c695f92..1938947 100755 --- a/jjb/shell/seba_on_arm.sh +++ b/jjb/shell/seba_on_arm.sh @@ -71,6 +71,15 @@ case "${JOB_NAME}" in IEC_DIR="/var/lib/akraino/iec" KUBE_DIR="~${K8S_SSH_USER}/.kube" UPSTREAM_PROJECT='rec' + # The REC cluster do not have a clone of the iec repo + IEC_REPO="https://gerrit.akraino.org/r/iec.git" + IEC_DIR="~${CLUSTER_SSH_USER}/iec" + IEC_CLONE_CMD="'if ! [ -d "$IEC_DIR" ];\ + then\ + mkdir -p $IEC_DIR;\ + git clone $IEC_REPO $IEC_DIR; + fi'" + run_on_k8s_master ssh "${IEC_CLONE_CMD}" ;; *) echo "Cannot determine installer from ${JOB_NAME}" @@ -86,9 +95,10 @@ fi export K8S_MASTER_IP UPSTREAM_PROJECT="${UPSTREAM_PROJECT:-${PROJECT}}" + case "${JOB_NAME}" in *-install-seba_on_arm*) - INSTALL_CMD="'cd ${IEC_DIR}/src/use_cases/seba_on_arm/install; ./install.sh ${UPSTREAM_PROJECT}'" + INSTALL_CMD="'cd ${IEC_DIR}/src/use_cases/seba_on_arm/install; K8S_MASTER_IP=${K8S_MASTER_IP} ./install.sh ${UPSTREAM_PROJECT}'" run_on_k8s_master ssh "${INSTALL_CMD}" ;; *-test-seba_on_arm*)