Allow build bending to transition straight to completed/failed
This commit is contained in:
parent
96c1d2e3f5
commit
3243bbb6af
|
@ -265,12 +265,12 @@ class BuildList < ActiveRecord::Base
|
||||||
# ===== into testing - end
|
# ===== into testing - end
|
||||||
|
|
||||||
event :build_success do
|
event :build_success do
|
||||||
transition [:build_started, :build_canceling, :build_canceled, :rerunning_tests] => :success
|
transition [:build_pending, :build_started, :build_canceling, :build_canceled, :rerunning_tests] => :success
|
||||||
end
|
end
|
||||||
|
|
||||||
[:build_error, :tests_failed].each do |kind|
|
[:build_error, :tests_failed].each do |kind|
|
||||||
event kind do
|
event kind do
|
||||||
transition [:build_started, :build_canceling, :build_canceled] => kind
|
transition [:build_started, :build_canceling, :build_canceled, :build_pending] => kind
|
||||||
transition rerunning_tests: :tests_failed
|
transition rerunning_tests: :tests_failed
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue