Skip to content
Snippets Groups Projects
Commit 71db3b1c authored by Kamil Trzcinski's avatar Kamil Trzcinski
Browse files

Make all future skipped builds as processable when retrying a build

parent 62e2989b
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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
Loading
Loading
Loading
Loading
@@ -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)
Loading
Loading
Loading
Loading
@@ -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
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment