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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
c6a7e95a
Commit
c6a7e95a
authored
Aug 15, 2019
by
Kamil Trzciński
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix failures
parent
478a4137
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
26 deletions
+14
-26
app/models/ci/group.rb
app/models/ci/group.rb
+1
-3
app/models/ci/legacy_stage.rb
app/models/ci/legacy_stage.rb
+1
-4
app/models/ci/pipeline.rb
app/models/ci/pipeline.rb
+9
-10
app/models/ci/stage.rb
app/models/ci/stage.rb
+1
-3
app/models/commit_status.rb
app/models/commit_status.rb
+2
-6
No files found.
app/models/ci/group.rb
View file @
c6a7e95a
...
...
@@ -23,9 +23,7 @@ module Ci
def
status
strong_memoize
(
:status
)
do
Gitlab
::
Ci
::
Status
::
GroupedStatuses
.
new
(
@jobs
)
.
one
[
:status
]
@jobs
.
slow_composite_status
end
end
...
...
app/models/ci/legacy_stage.rb
View file @
c6a7e95a
...
...
@@ -30,10 +30,7 @@ module Ci
end
def
status
@status
||=
Gitlab
::
Ci
::
Status
::
GroupedStatuses
.
new
(
statuses
.
latest
)
.
one
[
:status
]
@status
||=
statuses
.
latest
.
slow_composite_status
end
...
...
app/models/ci/pipeline.rb
View file @
c6a7e95a
...
...
@@ -390,16 +390,17 @@ module Ci
def
legacy_stages
# TODO, this needs refactoring, see gitlab-foss#26481.
Gitlab
::
Ci
::
Status
::
GroupedStatuses
stages
=
Gitlab
::
Ci
::
Status
::
GroupedStatuses
.
new
(
statuses
.
latest
,
:stage
,
:stage_idx
)
.
group
(
:stage
,
:stage_idx
)
.
sort_by
{
|
stage
|
stage
[
:stage_idx
]
}
.
map
do
|
stage
|
Ci
::
LegacyStage
.
new
(
self
,
name:
stage
[
:stage
],
status:
stage
[
:status
],
warnings:
stage
[
:warnings
])
end
stages
.
map
do
|
stage
|
Ci
::
LegacyStage
.
new
(
self
,
name:
stage
[
:stage
],
status:
stage
[
:status
],
warnings:
stage
[
:warnings
])
end
end
def
valid_commit_sha
...
...
@@ -904,9 +905,7 @@ module Ci
def
latest_builds_status
return
'failed'
unless
yaml_errors
.
blank?
Gitlab
::
Ci
::
Status
::
GroupedStatuses
.
new
(
statuses
.
latest
)
.
one
[
:status
]
||
'skipped'
statuses
.
latest
.
slow_composite_status
||
'skipped'
end
def
keep_around_commits
...
...
app/models/ci/stage.rb
View file @
c6a7e95a
...
...
@@ -126,9 +126,7 @@ module Ci
end
def
latest_stage_status
Gitlab
::
Ci
::
Status
::
GroupedStatuses
.
new
(
statuses
.
latest
)
.
one
[
:status
]
||
'skipped'
statuses
.
latest
.
slow_composite_status
||
'skipped'
end
end
end
app/models/commit_status.rb
View file @
c6a7e95a
...
...
@@ -161,15 +161,11 @@ class CommitStatus < ApplicationRecord
end
def
self
.
status_for_prior_stages
(
index
)
Gitlab
::
Ci
::
Status
::
GroupedStatuses
.
new
(
before_stage
(
index
).
latest
)
.
one
[
:status
]
||
'success'
before_stage
(
index
).
latest
.
slow_composite_status
||
'success'
end
def
self
.
status_for_names
(
names
)
Gitlab
::
Ci
::
Status
::
GroupedStatuses
.
new
(
where
(
name:
names
).
latest
)
.
one
[
:status
]
||
'success'
where
(
name:
names
).
latest
.
slow_composite_status
||
'success'
end
def
locking_enabled?
...
...
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