Fix csit branch for perf timed jobs 13/26313/2
authorJan Gelety <jgelety@cisco.com>
Fri, 27 Mar 2020 15:10:20 +0000 (16:10 +0100)
committerJan Gelety <jgelety@cisco.com>
Fri, 27 Mar 2020 19:11:15 +0000 (20:11 +0100)
- performance timed jobs in different csit branches need to be independent from other
  csit branches

Change-Id: Iec841864cdab4374094042d27b3d68a30b7427a1
Signed-off-by: Jan Gelety <jgelety@cisco.com>
jjb/scripts/csit/perf-timed.sh

index 1ef068c..76fabd5 100644 (file)
@@ -19,6 +19,8 @@ set -exuo pipefail
 #
 # Variables read:
 # - WORKSPACE - Jenkins workspace to create csit subdirectory in.
+# - GERRIT_BRANCH - Jenkins configured GERRIT_BRANCH parameter equal to required
+#   CSIT branch.
 # - CSIT_REF - Override ref of CSIT git repository to checkout.
 # Directories updated:
 # - ${WORKSPACE}/csit - Created, holding a checked out CSIT repository.
@@ -31,7 +33,7 @@ if [[ -n "${CSIT_REF-}" ]]; then
     git fetch --depth=1 https://gerrit.fd.io/r/csit "${CSIT_REF}"
     git checkout FETCH_HEAD
 else
-    git checkout HEAD
+    git checkout "${GERRIT_BRANCH}"
 fi
 popd
 csit_entry_dir="${WORKSPACE}/csit/resources/libraries/bash/entry"