0
我已經爲我的rails項目部署安裝了Capistrano &我正在從自定義上限任務運行我的單元測試,如下所示。Capistrano測試運行失敗,但部署成功
namespace :deploy do
desc "Runs test before deploying, can't deploy unless they pass"
task :run_tests do
puts "--> Running tests, please wait ..."
unless system "bundle exec rake > log/capistrano.log 2>&1" #' > /dev/null'
puts "--> Tests failed. Run `cat log/capistrano.log` to see what went wrong."
exit
else
puts "--> Tests passed"
end
puts "--> All tests passed"
end
end
如果在系統中的單元測試失敗,部署不會進一步進行,但在jenkins
構建是示出藍色。這意味着構建是成功的。
如何通知jenkins
構建以錯誤結束?