Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
f3b02b9e
Commit
f3b02b9e
authored
Sep 30, 2016
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Or we could simply ignore skipped manual jobs
parent
6053acf5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
app/models/concerns/has_status.rb
app/models/concerns/has_status.rb
+1
-1
app/services/ci/process_pipeline_service.rb
app/services/ci/process_pipeline_service.rb
+6
-1
No files found.
app/models/concerns/has_status.rb
View file @
f3b02b9e
...
@@ -21,7 +21,7 @@ module HasStatus
...
@@ -21,7 +21,7 @@ module HasStatus
deduce_status
=
"(CASE
deduce_status
=
"(CASE
WHEN (
#{
builds
}
)=(
#{
created
}
) THEN 'created'
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
}
)=(
#{
success
}
)+(
#{
ignored
}
)+(
#{
skipped
}
) THEN 'success'
WHEN (
#{
builds
}
)=(
#{
created
}
)+(
#{
pending
}
)+(
#{
skipped
}
) THEN 'pending'
WHEN (
#{
builds
}
)=(
#{
created
}
)+(
#{
pending
}
)+(
#{
skipped
}
) THEN 'pending'
WHEN (
#{
builds
}
)=(
#{
canceled
}
)+(
#{
success
}
)+(
#{
ignored
}
)+(
#{
skipped
}
) THEN 'canceled'
WHEN (
#{
builds
}
)=(
#{
canceled
}
)+(
#{
success
}
)+(
#{
ignored
}
)+(
#{
skipped
}
) THEN 'canceled'
...
...
app/services/ci/process_pipeline_service.rb
View file @
f3b02b9e
...
@@ -61,7 +61,12 @@ module Ci
...
@@ -61,7 +61,12 @@ module Ci
end
end
def
status_for_prior_stages
(
index
)
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
end
def
stage_indexes_of_created_builds
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