Fix pipeline status when allowed to fail jobs present
This commit is contained in:
parent
bf57a7e80c
commit
64e09a1b35
|
@ -37,7 +37,9 @@ module HasStatus
|
|||
end
|
||||
|
||||
def status
|
||||
all.pluck(status_sql).first
|
||||
all.pluck(status_sql).first.tap do |status|
|
||||
return 'success' if status == 'skipped' && all.failed_but_allowed.any?
|
||||
end
|
||||
end
|
||||
|
||||
def started_at
|
||||
|
|
|
@ -62,6 +62,10 @@ describe Ci::ProcessPipelineService, '#execute', :services do
|
|||
fail_running_or_pending
|
||||
|
||||
expect(builds_statuses).to eq %w(failed pending)
|
||||
|
||||
fail_running_or_pending
|
||||
|
||||
expect(pipeline.reload).to be_success
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue