提交 f3b02b9e 编写于 作者: L Lin Jen-Shin

Or we could simply ignore skipped manual jobs

上级 6053acf5
......@@ -21,7 +21,7 @@ module HasStatus
deduce_status = "(CASE
WHEN (#{builds})=(#{created}) THEN 'created'
WHEN (#{builds})=(#{skipped}) THEN 'success'
WHEN (#{builds})=(#{skipped}) THEN 'skipped'
WHEN (#{builds})=(#{success})+(#{ignored})+(#{skipped}) THEN 'success'
WHEN (#{builds})=(#{created})+(#{pending})+(#{skipped}) THEN 'pending'
WHEN (#{builds})=(#{canceled})+(#{success})+(#{ignored})+(#{skipped}) THEN 'canceled'
......
......@@ -61,7 +61,12 @@ module Ci
end
def status_for_prior_stages(index)
pipeline.builds.where('stage_idx < ?', index).latest.status || 'success'
quoted_when = pipeline.builds.connection.quote_column_name('when')
pipeline.builds.
where('stage_idx < ?', index).
# We want to ignore skipped manual jobs
where("#{quoted_when} <> ? OR status <> ?", 'manual', 'skipped').
latest.status || 'success'
end
def stage_indexes_of_created_builds
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册