Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
c4c53e20bb5e
Commit
f3b02b9e
authored
Sep 30, 2016
by
Lin Jen-Shin
Browse files
Or we could simply ignore skipped manual jobs
parent
bd5357706a2e
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/models/concerns/has_status.rb
View file @
c4c53e20
...
...
@@ -21,7 +21,7 @@ def status_sql
deduce_status
=
"(CASE
WHEN (
#{
builds
}
)=(
#{
created
}
) THEN 'created'
WHEN (
#{
builds
}
)=(
#{
skipped
}
) THEN 's
uccess
'
WHEN (
#{
builds
}
)=(
#{
skipped
}
) THEN 's
kipped
'
WHEN (
#{
builds
}
)=(
#{
success
}
)+(
#{
ignored
}
)+(
#{
skipped
}
) THEN 'success'
WHEN (
#{
builds
}
)=(
#{
created
}
)+(
#{
pending
}
)+(
#{
skipped
}
) THEN 'pending'
WHEN (
#{
builds
}
)=(
#{
canceled
}
)+(
#{
success
}
)+(
#{
ignored
}
)+(
#{
skipped
}
) THEN 'canceled'
...
...
app/services/ci/process_pipeline_service.rb
View file @
c4c53e20
...
...
@@ -61,7 +61,12 @@ def valid_statuses_for_when(value)
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment