Tôi mới sử dụng Jenkins CI. Tôi đang cài đặt RVM trong Jenkins từ xa của mình và khi tôi thực thi trình bao dưới đây.Thiết lập RVM và Jenkins
#!/bin/bash -x
source ~/.bashrc
rvm use [email protected]
Tôi gặp lỗi sau.
+ 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.
Điều đó có nghĩa là gì? Tôi không có ý kiến gì cả. Làm ơn giúp tôi.
CẬP NHẬT: Tôi đang cố gắng bên dưới kịch bản nhưng tôi vẫn nhận được lỗi:
#!/bin/bash -x
source /home/zeck/.bashrc
[[ -s ".rvmrc" ]] && source .rvmrc
export RAILS_ENV=test
bundle install
Lỗi:
/tmp/hudson457106939700368111.sh: line 5: bundle: command not found
Build step 'Execute shell' marked build as failure
Finished: FAILURE
Jenkins xây dựng vỏ không thể phát hiện RVM, gemsets và đá quý. Tôi nên làm gì?
CẬP NHẬT 2: Do đó jenkins không thể phát hiện ruby.
+ ruby -v
/tmp/hudson2505951775163045158.sh: line 5: ruby: command not found
Build step 'Execute shell' marked build as failure
Finished: FAILUR
Tôi không sử dụng bất kỳ plugin jenkins nào và tôi chỉ chạy tập lệnh từ Build-> Execute shell section.
Zeck, tôi cũng đang giải quyết vấn đề này, bạn đã khắc phục sự cố như thế nào ??? – Farooq