summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2023-05-25 15:07:21 +0000
committerMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2023-05-26 07:13:07 +0000
commit60bc7fcebe6853d44eb01e5689fdaf4b00d668c4 (patch)
tree9b36ce35a91bdfe8191a61c1068036384df8e91c
parentc006b805d247f8f34a854c4524fc72fd1586fa8b (diff)
jenkins-helpers.sh: Use default base-artifacts/ when no defined value
Change-Id: I4f7cf66baa2b454ee60c0504398ff33dc5fe414d
-rw-r--r--jenkins-helpers.sh13
1 files changed, 11 insertions, 2 deletions
diff --git a/jenkins-helpers.sh b/jenkins-helpers.sh
index 2c11c12b..251da529 100644
--- a/jenkins-helpers.sh
+++ b/jenkins-helpers.sh
@@ -952,9 +952,18 @@ get_baseline_git ()
{
(
set -euf -o pipefail
+
+ local base_artifacts
+
+ if test_array rr && [[ -v rr[base_artifacts] ]]; then
+ base_artifacts=${rr[base_artifacts]}
+ else
+ base_artifacts="base-artifacts"
+ fi
+
assert_with_msg "ERROR: No $1 in baseline git" \
- [ -f "${rr[base_artifacts]}/git/$1" ]
- cat "${rr[base_artifacts]}/git/$1"
+ [ -f "$base_artifacts/git/$1" ]
+ cat "$base_artifacts/git/$1"
)
}