Make all future skipped builds as processable when retrying a build
This commit is contained in:
parent
62e2989bb7
commit
71db3b1ce7
3 changed files with 9 additions and 0 deletions
|
@ -62,6 +62,7 @@ module Ci
|
|||
status_event: 'enqueue'
|
||||
)
|
||||
MergeRequests::AddTodoWhenBuildFailsService.new(build.project, nil).close(new_build)
|
||||
build.pipeline.mark_as_processable_after_stage(build.stage_idx)
|
||||
new_build
|
||||
end
|
||||
end
|
||||
|
|
|
@ -136,6 +136,10 @@ module Ci
|
|||
end
|
||||
end
|
||||
|
||||
def mark_as_processable_after_stage(stage_idx)
|
||||
builds.skipped.where('stage_idx > ?', stage_idx).each(&:process)
|
||||
end
|
||||
|
||||
def latest?
|
||||
return false unless ref
|
||||
commit = project.commit(ref)
|
||||
|
|
|
@ -30,6 +30,10 @@ class CommitStatus < ActiveRecord::Base
|
|||
transition [:created, :skipped] => :pending
|
||||
end
|
||||
|
||||
event :process do
|
||||
transition skipped: :created
|
||||
end
|
||||
|
||||
event :run do
|
||||
transition pending: :running
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue