Добрый день. Впервые сам создаю дженкинс джобу для запуска тестов на пайтон.
Настройки такие:
Падает билд с такими ошибками:
Installing collected packages: setuptools, pip
Successfully installed pip-10.0.1 setuptools-39.0.1
$ bash -c "rm -rf \$HOME/.pyenv.lock"
FATAL: (CommandError) failed: "env PYENV_ROOT\\=\\$HOME/.pyenv PYENV_VERSION\\=3.7.1 \\$HOME/.pyenv/bin/pyenv install 3.7.1"
org.jruby.exceptions.RaiseException: (CommandError) failed: "env PYENV_ROOT\\=\\$HOME/.pyenv PYENV_VERSION\\=3.7.1 \\$HOME/.pyenv/bin/pyenv install 3.7.1"
at RUBY.run(/Users/Shared/Jenkins/Home/plugins/pyenv/WEB-INF/classes/lib/pyenv/invoke.rb:18)
at RUBY.setup!(/Users/Shared/Jenkins/Home/plugins/pyenv/WEB-INF/classes/lib/pyenv.rb:29)
at RUBY.synchronize(/Users/Shared/Jenkins/Home/plugins/pyenv/WEB-INF/classes/lib/pyenv/semaphore.rb:15)
at RUBY.setup!(/Users/Shared/Jenkins/Home/plugins/pyenv/WEB-INF/classes/lib/pyenv.rb:24)
at RUBY.setup(/Users/Shared/Jenkins/Home/plugins/pyenv/WEB-INF/classes/models/pyenv_wrapper.rb:57)
at RUBY.setUp(/Users/Shared/Jenkins/Home/plugins/pyenv/WEB-INF/classes/vendor/gems/gems/jenkins-plugin-runtime-0.2.3/lib/jenkins/model/environment_proxy.rb:8)
[WS-CLEANUP] Deleting project workspace...
[WS-CLEANUP] Deferred wipeout is used...
[WS-CLEANUP] done
Finished: FAILURE
Что я неправильно делаю?
возможно у вас похожий случай
opened 07:52PM - 07 Mar 14 UTC
From the build's console log:
``` sh
$ bash -c "[ -d \$HOME/.rbenv ]"
$ bash -c… "[ -d \$HOME/.rbenv/plugins/ruby-build ]"
$ bash -c "cd /home/jenkins/workspace/xxx && env RBENV_ROOT\=\$HOME/.rbenv RBENV_VERSION\=2.1.1 \$HOME/.rbenv/bin/rbenv local 2>/dev/null || true"
$ bash -c "mkdir \$HOME/.rbenv.lock"
$ bash -c "env RBENV_ROOT\=\$HOME/.rbenv RBENV_VERSION\=2.1.1 \$HOME/.rbenv/bin/rbenv versions --bare"
Updating rbenv...
$ bash -c "cd \$HOME/.rbenv && git checkout master && git pull"
Already on 'master'
Already up-to-date.
Updated rbenv.
Updating ruby-build...
$ bash -c "cd \$HOME/.rbenv/plugins/ruby-build && git checkout master && git pull"
Already on 'master'
Already up-to-date.
Updated ruby-build.
Installing 2.1.1...
$ bash -c "env RBENV_ROOT\=\$HOME/.rbenv RBENV_VERSION\=2.1.1 \$HOME/.rbenv/bin/rbenv install 2.1.1"
Downloading ruby-2.1.1.tar.gz...
-> http://dqw8nmjcqpjn7.cloudfront.net/e57fdbb8ed56e70c43f39c79da1654b2
Installing ruby-2.1.1...
BUILD FAILED
Inspect or clean up the working tree at /tmp/ruby-build.20140307194332.8158
Results logged to /tmp/ruby-build.20140307194332.8158.log
Last 10 log lines:
io-console 0.4.2
json 1.8.1
minitest 4.7.5
psych 2.0.3
rake 10.1.0
rdoc 4.1.0
test-unit 2.1.1.0
installing rdoc: /home/jenkins/$(HOME)/.rbenv/versions/2.1.1/share/ri/2.1.0/system
installing capi-docs: /home/jenkins/$(HOME)/.rbenv/versions/2.1.1/share/doc/ruby
$HOME/.rbenv/plugins/ruby-build/bin/ruby-build: line 781: /home/jenkins/$HOME/.rbenv/versions/2.1.1/bin/ruby: No such file or directory
$ bash -c "rmdir \$HOME/.rbenv.lock"
FATAL: (CommandError) failed: "env RBENV_ROOT\\=\\$HOME/.rbenv RBENV_VERSION\\=2.1.1 \\$HOME/.rbenv/bin/rbenv install 2.1.1"
org.jruby.exceptions.RaiseException: (CommandError) failed: "env RBENV_ROOT\\=\\$HOME/.rbenv RBENV_VERSION\\=2.1.1 \\$HOME/.rbenv/bin/rbenv install 2.1.1"
at RUBY.run(/Users/Shared/Jenkins/Home/plugins/rbenv/WEB-INF/classes/lib/rbenv/invoke.rb:18)
at RUBY.setup!(/Users/Shared/Jenkins/Home/plugins/rbenv/WEB-INF/classes/lib/rbenv.rb:29)
at RUBY.synchronize(/Users/Shared/Jenkins/Home/plugins/rbenv/WEB-INF/classes/lib/rbenv/semaphore.rb:15)
at RUBY.setup!(/Users/Shared/Jenkins/Home/plugins/rbenv/WEB-INF/classes/lib/rbenv.rb:24)
at RUBY.setup(/Users/Shared/Jenkins/Home/plugins/rbenv/WEB-INF/classes/models/rbenv_wrapper.rb:61)
at RUBY.setUp(/Users/Shared/Jenkins/Home/plugins/rbenv/WEB-INF/classes/vendor/gems/gems/jenkins-plugin-runtime-0.2.3/lib/jenkins/model/environment_proxy.rb:8)
```
zubtest
(zub_test)
January 25, 2019, 2:30pm
#3
Попробуйте вместо шага Python Builder использовать Execute shell.
Сначала напишите просто python --version
и запустите джобу, чтобы проверить. Затем расширяйте команду, постепенно добавляя сначала установку зависимостей, затем сам запуск тестов.