You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 30, 2018. It is now read-only.
I use gocd agent to build a CI machine demo, and found it uses setuser tool to run CI service with a seperated user, for example 'testci'. My application is a Rails app. The CI server needs a ruby env to run each test. I have installed rvm for user 'testci', and use these commands to check, the ruby env is OK:
(I use docker compose, docker name is 'ci')
docker-compose run ci bash
su - testci
ruby -v
output is 'ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-linux]', ruby does works.
But the problem is when the CI run each test, it always can't found ruby. Because the rvm config is be written in .bash_profile, a logined user can read it correctly so all ok, I guess setuser tool maybe didn't read .bash_profile then ruby not works.
Did I missed or ignored something? and I want to know the setuser tool can run a service like a real logined user?
In fact, my problem is how to add the ruby env in gocd agent correctly?
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I use gocd agent to build a CI machine demo, and found it uses setuser tool to run CI service with a seperated user, for example 'testci'. My application is a Rails app. The CI server needs a ruby env to run each test. I have installed rvm for user 'testci', and use these commands to check, the ruby env is OK:
(I use docker compose, docker name is 'ci')
output is 'ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-linux]', ruby does works.
But the problem is when the CI run each test, it always can't found ruby. Because the rvm config is be written in .bash_profile, a logined user can read it correctly so all ok, I guess setuser tool maybe didn't read .bash_profile then ruby not works.
Did I missed or ignored something? and I want to know the setuser tool can run a service like a real logined user?
In fact, my problem is how to add the ruby env in gocd agent correctly?
The text was updated successfully, but these errors were encountered: