Estou tentando fazer o jenkins rodar em um nó de trabalho para testar alguns projetos do Rails no Ubuntu 14.04. Eu instalei o RVM por estes documentos . Quando eu inicio uma compilação do "mestre" do Jenkins, a saída do console da compilação do nó produz a saída abaixo. O diretório inicial do usuário jenkins contém um diretório .rvm que foi copiado de um backup. Definitivamente uma instalação mais antiga de rvm. Isso deveria importar? Eu não estou familiarizado com rvm.
...
$ bash -c export
$ bash -c "test -f ~/.rvm/scripts/rvm"
$ bash -c "test -f ~/.rvm/scripts/rvm"
[PIMS] $ bash -c " source ~/.rvm/scripts/rvm && rvm use --install --create . && export > rvm.env"
Using /usr/share/rvm/gems/ruby-2.3.5
[PIMS] $ /bin/bash +x +e /tmp/jenkins1009584960163749179.sh
GemWrappers: Can not wrap missing file: bundle
GemWrappers: Can not wrap missing file: bundler
GemWrappers: Can not wrap missing file: rb2db
unable to convert "\xE2" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb, skipping
unable to convert "\xE2" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb, skipping
Successfully installed bundler-1.16.1
Successfully installed rb2db-0.2.2
2 gems installed
Installing ri documentation for bundler-1.16.1...
Installing ri documentation for rb2db-0.2.2...
Installing RDoc documentation for bundler-1.16.1...
Installing RDoc documentation for rb2db-0.2.2...
/tmp/jenkins1009584960163749179.sh: line 70: rvm: command not found
/tmp/jenkins1009584960163749179.sh: line 77: bundle: command not found
/tmp/jenkins1009584960163749179.sh: line 89: bundle: command not found
/tmp/jenkins1009584960163749179.sh: line 90: bundle: command not found
/usr/bin/xvfb-run: 184: /usr/bin/xvfb-run: bundle: not found
/tmp/jenkins1009584960163749179.sh: line 108: tmp/failures.log: No such file or directory
grep: tmp/failing_specs.log: No such file or directory
...
Quando executo which
da linha de comando, como o usuário jenkins, esses comandos aparecem bem. Onde poderia estar o problema?
$ echo $PATH
/usr/share/rvm/gems/ruby-2.3.5/bin:
/usr/share/rvm/gems/ruby-2.3.5@global/bin:
/usr/share/rvm/rubies/ruby-2.3.5/bin:/bin:/sbin:
/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:
/usr/lib/jvm/java-8-oracle/bin:
/usr/lib/jvm/java-8-oracle/db/bin:
/usr/lib/jvm/java-8-oracle/jre/bin:
/opt/instantclient_12_2:/usr/share/rvm/bin
[jenkins@node1 ~/workspace]
$ which rvm
/usr/share/rvm/bin/rvm
[jenkins@node1 ~/workspace]
$ which bundle
/usr/share/rvm/gems/ruby-2.3.5/bin/bundle
[jenkins@node1 ~/workspace]
$ which rb2db
/usr/share/rvm/gems/ruby-2.3.5/bin/rb2dnb
[jenkins@node1 ~/workspace]
$ which xvfb-run
/usr/bin/xvfb-run
Tags rvm jenkins ruby-on-rails