Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cf ssh needs a PATH, add yum for RedHat #10

Merged
merged 3 commits into from
Jun 28, 2024
Merged

Conversation

pburkholder
Copy link
Contributor

@pburkholder pburkholder commented Jun 26, 2024

This may address #9.

We should probably test by having Alpine, Debian and RedHat based worker images run, but that will be a later issue

@pburkholder pburkholder requested review from a team June 26, 2024 20:42
@@ -117,10 +117,12 @@ 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 \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: what's the pseudo-tty's purpose here?

I do remember you had an issue when you were trying locally and this seemed to have an impact, but w/ the runner it doesn't make a difference for me as far as I can tell.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the request bit is actually being denied. I don't know that for sure, but when I try force... instead it just hangs.

@zjrgov
Copy link
Contributor

zjrgov commented Jun 26, 2024

source /etc/profile fixes the PATH issue for this dependency check but not for running the tasks themselves. I'm looking where it might need to be sourced again but I think this might be somewhat obscured by gitlab-runner (it is not, see #10 (comment)).

@zjrgov
Copy link
Contributor

zjrgov commented Jun 26, 2024

This bit is loading a set of scripts on the runner into the cf ssh. So might be able to get it to source the /etc/profile by running the scripts differently or maybe we can use some of the regular SSH flags to get a login shell. I will try to check this later but figured I'd make a note of it in the meantime.

Copy link
Contributor

@pauldoomgov pauldoomgov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@pburkholder pburkholder merged commit f4bf719 into main Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants