From 8c43dbbbcefe97556cd9616342f95460a9b46f0c Mon Sep 17 00:00:00 2001 From: Peter Burkholder Date: Wed, 26 Jun 2024 16:37:32 -0400 Subject: [PATCH] cf ssh needs a PATH --- runner/cf-driver/prepare.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/runner/cf-driver/prepare.sh b/runner/cf-driver/prepare.sh index c363b18..37ba2ee 100755 --- a/runner/cf-driver/prepare.sh +++ b/runner/cf-driver/prepare.sh @@ -117,10 +117,11 @@ install_dependencies () { # Of course, RedHat/UBI will need more help to add RPM repos with the correct # version. TODO - RedHat support echo "[cf-driver] Ensuring git, git-lfs, and curl are installed" - cf ssh "$container_id" -c '(which git && which git-lfs && which curl) || \ + cf ssh "$container_id" --request-pseudo-tty \ + --command 'source /etc/profile && (which git && which git-lfs && which curl) || \ (which apk && apk add git git-lfs curl) || \ (which apt-get && apt-get update && apt-get install -y git git-lfs curl) || \ - (echo "Required packages missing and I do not know what to do about it" && exit 1)' + (echo "[cf-driver] Required packages missing and install attempt failed" && exit 1)' # gitlab-runner-helper includes a limited subset of gitlab-runner functionality # plus Git and Git-LFS. https://s3.dualstack.us-east-1.amazonaws.com/gitlab-runner-downloads/latest/index.html