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
|
end
|
||||||
|
|
||||||
def status
|
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
|
end
|
||||||
|
|
||||||
def started_at
|
def started_at
|
||||||
|
|
|
@ -62,6 +62,10 @@ describe Ci::ProcessPipelineService, '#execute', :services do
|
||||||
fail_running_or_pending
|
fail_running_or_pending
|
||||||
|
|
||||||
expect(builds_statuses).to eq %w(failed pending)
|
expect(builds_statuses).to eq %w(failed pending)
|
||||||
|
|
||||||
|
fail_running_or_pending
|
||||||
|
|
||||||
|
expect(pipeline.reload).to be_success
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue