This is a common issue that has more to do with docker itself than the gitlab ci multi runner (if you run the container yourself manually, you hit the same problem). The skeleton files setup (.bash_profile, .bashrc, etc) are not run.
There are 2 different approaches that should work for you:
Append to the PATH environment variable in the Dockerfile used to build this image: ENV PATH $PATH:/path/to/nvm/bin:/path/to/rvm/bin
Runner uses .bashrc, but problem is that most .bashrc have early return if the session is not interactive. Env variables you should add to .profile instead.
The above doesn't apply to docker where always non-login shell is used.
@ayufan For example when I use the command rvm, the output show the source file.
For to show the command output in CI, how you do that ?
In 0.4.2, if I use set +v before my command, the content of source file is hidden.
@Fridus this is the case with 0.4.2 in 0.5.0 (which will be released in upcoming days) the behaviour is changed: commands are echoed and verbose mode is not used anymore
@ayufan Out of curiosity: Can you tell me why docker always uses the non-login shell? Is there any script that will be called when the image starts running?
As I am currently working on some runner-images and everytime something has to be started "by hand" and I can't just add it to the .bashrc it is like hitting a brick wall.
Is there any other way to execute code whenever the image is started? (Except adding it to the .gitlab-ci.yml. I don't think runner-setup should be in the Config there.)