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

RBENV_DIR in builds #2744

Closed
viraptor opened this issue May 14, 2018 · 2 comments · Fixed by #2748
Closed

RBENV_DIR in builds #2744

viraptor opened this issue May 14, 2018 · 2 comments · Fixed by #2748

Comments

@viraptor
Copy link
Contributor

I've run into an unexpected Samson behaviour.

When running a ruby script inside the deployment actions, RBENV_DIR is inherited from Samson's runtime in my deployment. That means anything expecting the right ruby to be set via .ruby-version will fail :(

While the fix is easy (unset RBENV_DIR at the beginning of the build), it needs to be done for every project separately and all teams need to learn about it. It would be great if I could configure Samson to drop some environment variables globally. For example never pass the RBENV_DIR / PATH / RAILS_ENV / HOME to the jobs it's running.

@grosser
Copy link
Contributor

grosser commented May 18, 2018

whitelisted env vars are defined here:

https://github.com/zendesk/samson/blob/master/app/models/terminal_executor.rb#L166-L175

we might be able to remove RBENV_DIR ...
PATH needs to stay or nothing works like ls etc
RAILS_ENV etc is already not passed in

@grosser
Copy link
Contributor

grosser commented May 18, 2018

keep these issues coming ... such a basic flaw that we never addresses since we added that into our base commands years ago :D

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 a pull request may close this issue.

2 participants