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
iv
gitlab-ce
Commits
5cd504ed
Commit
5cd504ed
authored
Oct 12, 2015
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename builds_without_retry to latest_builds
parent
2e9c1608
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
14 additions
and
14 deletions
+14
-14
app/models/ci/commit.rb
app/models/ci/commit.rb
+7
-7
app/models/project_services/ci/hip_chat_service.rb
app/models/project_services/ci/hip_chat_service.rb
+1
-1
app/models/project_services/ci/mail_service.rb
app/models/project_services/ci/mail_service.rb
+1
-1
app/models/project_services/ci/slack_message.rb
app/models/project_services/ci/slack_message.rb
+1
-1
app/models/project_services/ci/slack_service.rb
app/models/project_services/ci/slack_service.rb
+1
-1
app/services/ci/create_commit_service.rb
app/services/ci/create_commit_service.rb
+1
-1
app/views/projects/builds/show.html.haml
app/views/projects/builds/show.html.haml
+2
-2
No files found.
app/models/ci/commit.rb
View file @
5cd504ed
...
...
@@ -48,7 +48,7 @@ module Ci
end
def
retry
builds_without_retry
.
each
do
|
build
|
latest_builds
.
each
do
|
build
|
Ci
::
Build
.
retry
(
build
)
end
end
...
...
@@ -113,12 +113,12 @@ module Ci
@latest_statuses
||=
statuses
.
latest
.
to_a
end
def
builds_without_retry
@
builds_without_retry
||=
builds
.
latest
.
to_a
def
latest_builds
@
latest_builds
||=
builds
.
latest
.
to_a
end
def
builds_without_retry
_for_ref
(
ref
)
builds_without_retry
.
select
{
|
build
|
build
.
ref
==
ref
}
def
latest_builds
_for_ref
(
ref
)
latest_builds
.
select
{
|
build
|
build
.
ref
==
ref
}
end
def
retried
...
...
@@ -181,7 +181,7 @@ module Ci
def
coverage
if
project
.
coverage_enabled?
coverage_array
=
builds_without_retry
.
map
(
&
:coverage
).
compact
coverage_array
=
latest_builds
.
map
(
&
:coverage
).
compact
if
coverage_array
.
size
>=
1
'%.2f'
%
(
coverage_array
.
reduce
(:
+
)
/
coverage_array
.
size
)
end
...
...
@@ -189,7 +189,7 @@ module Ci
end
def
matrix_for_ref?
(
ref
)
builds_without_retry
_for_ref
(
ref
).
size
>
1
latest_builds
_for_ref
(
ref
).
size
>
1
end
def
config_processor
...
...
app/models/project_services/ci/hip_chat_service.rb
View file @
5cd504ed
...
...
@@ -49,7 +49,7 @@ module Ci
commit
=
build
.
commit
return
unless
commit
return
unless
commit
.
builds_without_retry
.
include?
build
return
unless
commit
.
latest_builds
.
include?
build
case
commit
.
status
.
to_sym
when
:failed
...
...
app/models/project_services/ci/mail_service.rb
View file @
5cd504ed
...
...
@@ -48,7 +48,7 @@ module Ci
# it doesn't make sense to send emails for retried builds
commit
=
build
.
commit
return
unless
commit
return
unless
commit
.
builds_without_retry
.
include?
(
build
)
return
unless
commit
.
latest_builds
.
include?
(
build
)
case
build
.
status
.
to_sym
when
:failed
...
...
app/models/project_services/ci/slack_message.rb
View file @
5cd504ed
...
...
@@ -23,7 +23,7 @@ module Ci
def
attachments
fields
=
[]
commit
.
builds_without_retry
.
each
do
|
build
|
commit
.
latest_builds
.
each
do
|
build
|
next
if
build
.
allow_failure?
next
unless
build
.
failed?
fields
<<
{
...
...
app/models/project_services/ci/slack_service.rb
View file @
5cd504ed
...
...
@@ -48,7 +48,7 @@ module Ci
commit
=
build
.
commit
return
unless
commit
return
unless
commit
.
builds_without_retry
.
include?
(
build
)
return
unless
commit
.
latest_builds
.
include?
(
build
)
case
commit
.
status
.
to_sym
when
:failed
...
...
app/services/ci/create_commit_service.rb
View file @
5cd504ed
...
...
@@ -21,7 +21,7 @@ module Ci
commit
.
update_committed!
commit
.
create_builds
(
ref
,
tag
,
user
)
end
commit
end
end
...
...
app/views/projects/builds/show.html.haml
View file @
5cd504ed
...
...
@@ -9,7 +9,7 @@
#up-build-trace
-
if
@commit
.
matrix_for_ref?
(
@build
.
ref
)
%ul
.center-top-menu.build-top-menu
-
@commit
.
builds_without_retry
_for_ref
(
@build
.
ref
).
each
do
|
build
|
-
@commit
.
latest_builds
_for_ref
(
@build
.
ref
).
each
do
|
build
|
%li
{
class:
(
'active'
if
build
==
@build
)
}
=
link_to
namespace_project_build_path
(
@project
.
namespace
,
@project
,
build
)
do
=
ci_icon_for_status
(
build
.
status
)
...
...
@@ -20,7 +20,7 @@
=
build
.
id
-
unless
@commit
.
builds_without_retry
_for_ref
(
@build
.
ref
).
include?
(
@build
)
-
unless
@commit
.
latest_builds
_for_ref
(
@build
.
ref
).
include?
(
@build
)
%li
.active
%a
Build ##{@build.id}
...
...
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