わからないこと
現在、VPS上のjenkinsでrubyを動かすシステムを構築しておりましてその際にbuildを選択すると以下のエラーが、
/tmp/jenkins#############.sh: line : ruby: command not found Build step 'Execute shell' marked build as failure
VPSサーバーのRubyのバージョンはこちら
$ ruby -v ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux] $which ruby ~/.rbenv/shims/ruby
bash
1# .bash_profile 2 3# Get the aliases and functions 4if [ -f ~/.bashrc ]; then 5 . ~/.bashrc 6fi 7 8# User specific environment and startup programs 9 10PATH=$PATH:$HOME/.local/bin:$HOME/bin 11 12export PATH 13export PATH="$HOME/.rbenv/bin:$PATH" 14eval "$(rbenv init -)"
試したこと
記事を見ているとbashの中身をjenkins上でexportしてあげる必要があるみたいでその設定をしてみたのですが
jenkinsshell
1# .bash_profile 2 3# Get the aliases and functions 4if [ -f ~/.bashrc ]; then 5 . ~/.bashrc 6fi 7 8# User specific environment and startup programs 9 10PATH=$PATH:$HOME/.local/bin:$HOME/bin 11 12export PATH 13export PATH="$HOME/.rbenv/bin:$PATH" 14eval "$(rbenv init -)"
/tmp/jenkins#####################.sh: line 17: rbenv: command not found
どなたか知見があればご教授お願い致します
追記
su - jenkins
の中のbash_profileも上記と同じ環境にして実施も試してみましたが動かない状況でした。
回答3件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/07/30 11:04