Fix: Update ci-management repo if already present 32/133732/2
authorMatthew Watkins <mwatkins@linuxfoundation.org>
Wed, 22 Mar 2023 12:16:34 +0000 (12:16 +0000)
committerMatthew Watkins <mwatkins@linuxfoundation.org>
Wed, 22 Mar 2023 12:20:22 +0000 (12:20 +0000)
Issue-ID: CIMAN-33
Signed-off-by: Matthew Watkins <mwatkins@linuxfoundation.org>
Change-Id: Iac6368b9b5bb4d788d9e2e6965cf9651545565a3

jjb/integration/prepare-csit.sh

index 0db140f..dc732c6 100644 (file)
@@ -96,9 +96,13 @@ if [[ -f "${ROBOT3_VENV}/bin/activate" ]]; then
     source "${ROBOT3_VENV}/bin/activate"
 else
     # Robot framework was not found
-    #  clone ci-management repository and use install script
-    git clone "https://gerrit.onap.org/r/ci-management" \
+    #  Clone/update ci-management repository and invoke install script
+    if [[ ! -d /tmp/ci-management ]]; then
+        git clone "https://gerrit.onap.org/r/ci-management" \
         /tmp/ci-management
+    else
+        git pull /tmp/ci-management
+    fi
     # shellcheck disable=SC1090
     source "/tmp/ci-management/jjb/integration/${ROBOT_INSTALLER}"
 fi