RVM und Jenkins Setup

Ich bin neu bei Jenkins CI. Ich installiere RVM in meinen Remote-Jenkins und wenn ich sie unter der Shell ausführe.

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

Ich erhalte folgende Fehlermeldungen.

<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>

Was heißt das? Ich habe keine Ahnung. Bitte hilf mir.

AKTUALISIERTE: Ich habe es mit dem folgenden Skript versucht, erhalte jedoch weiterhin Fehler:

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

Fehler:

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

Jenkins Build Shell kann RVM, Gemsets und Gems nicht erkennen. Was soll ich machen?

AKTUALISIERT 2: Daher können Jenkins kein Rubin erkennen.

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

Ich verwende kein Jenkins-Plugin und starte das Skript einfach im Abschnitt Build-> Execute Shell.

Antworten auf die Frage(6)

Ihre Antwort auf die Frage