From 99423df55ed1791f41eda86bb2f5db52208bce6a Mon Sep 17 00:00:00 2001 From: Scott Hebert Date: Wed, 17 Apr 2024 16:09:23 -0400 Subject: [PATCH] fix(KFLUXBUGS-1215): fix use of PREFETCH_INPUT - quotes within variable are not handled very well by ssh command and it impacts the buildah-remote task (which is based on this task) we only need to know if prefetch was used, not the actual input. Therefore, we simplify the variable. Signed-off-by: Scott Hebert --- task/buildah-remote/0.1/buildah-remote.yaml | 10 ++++++++++ task/buildah/0.1/buildah.yaml | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/task/buildah-remote/0.1/buildah-remote.yaml b/task/buildah-remote/0.1/buildah-remote.yaml index d2dc52915d..c9d4cd4ca1 100644 --- a/task/buildah-remote/0.1/buildah-remote.yaml +++ b/task/buildah-remote/0.1/buildah-remote.yaml @@ -258,6 +258,16 @@ spec: mkdir -p "$YUM_REPOS_D_FETCHED" cp --no-clobber "$prefetched_repo_for_my_arch" "$YUM_REPOS_D_FETCHED" fi + + # quotes within variable are not handled very well + # by ssh command and it impacts the buildah-remote task (which is based on this task) + # we only need to know if prefetch was used, not the actual + # input. Therefore, we simplify the variable. + # + if [ -n "${PREFETCH_INPUT}" ] ; then + PREFETCH_INPUT="prefetched" + fi + fi # if yum repofiles stored in git, copy them to mount point outside the source dir diff --git a/task/buildah/0.1/buildah.yaml b/task/buildah/0.1/buildah.yaml index 165129fec8..e780f91222 100644 --- a/task/buildah/0.1/buildah.yaml +++ b/task/buildah/0.1/buildah.yaml @@ -210,6 +210,16 @@ spec: mkdir -p "$YUM_REPOS_D_FETCHED" cp --no-clobber "$prefetched_repo_for_my_arch" "$YUM_REPOS_D_FETCHED" fi + + # quotes within variable are not handled very well + # by ssh command and it impacts the buildah-remote task (which is based on this task) + # we only need to know if prefetch was used, not the actual + # input. Therefore, we simplify the variable. + # + if [ -n "${PREFETCH_INPUT}" ] ; then + PREFETCH_INPUT="prefetched" + fi + fi # if yum repofiles stored in git, copy them to mount point outside the source dir