Configuração RVM e Jenkins

Eu sou novo no Jenkins CI. Estou instalar o RVM no meu Jenkins remoto e quando executo abaixo do shell.

<code>#!/bin/bash -x
source ~/.bashrc
rvm use [email protected]
</code>

Eu recebo erros seguintes.

<code>+ source /var/lib/jenkins/.bashrc
++ PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/var/lib/jenkins/.rvm/bin:/var/lib/jenkins/.rvm/bin
+ rvm use [email protected]

RVM is not a function, selecting rubies with 'rvm use ...' will not work.
You need to change your terminal settings to allow shell login.
Please visit https://rvm.io/workflow/screen/ for example.
</code>

O que isso significa? Eu não tenho ideia. Por favor me ajude.

ATUALIZADA: Eu estou tentando abaixo do script, mas ainda recebo erros:

<code>#!/bin/bash -x
source /home/zeck/.bashrc
[[ -s ".rvmrc" ]] && source .rvmrc
export RAILS_ENV=test
bundle install
</code>

Erros:

<code>/tmp/hudson457106939700368111.sh: line 5: bundle: command not found
Build step 'Execute shell' marked build as failure
Finished: FAILURE
</code>

O shell de construção do Jenkins não consegue detectar RVM, gemsets e gems. O que devo fazer?

ATUALIZADO 2: Portanto, os jenkins não conseguem detectar o rubi.

<code>+ ruby -v
/tmp/hudson2505951775163045158.sh: line 5: ruby: command not found
Build step 'Execute shell' marked build as failure
Finished: FAILUR
</code>

Eu não estou usando qualquer plug-in Jenkins e eu sou apenas executar script da seção Build-> Execute shell.

questionAnswers(6)

yourAnswerToTheQuestion