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
Tatuya Kamada
gitlab-ce
Commits
0d43b927
Commit
0d43b927
authored
May 12, 2016
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix CI tests
parent
86cedb08
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
9 deletions
+12
-9
app/controllers/projects/pipelines_controller.rb
app/controllers/projects/pipelines_controller.rb
+5
-3
app/models/project.rb
app/models/project.rb
+1
-1
app/services/ci/create_pipeline_service.rb
app/services/ci/create_pipeline_service.rb
+1
-1
app/views/projects/commit/_ci_stage.html.haml
app/views/projects/commit/_ci_stage.html.haml
+3
-2
app/views/projects/pipelines/index.html.haml
app/views/projects/pipelines/index.html.haml
+2
-2
No files found.
app/controllers/projects/pipelines_controller.rb
View file @
0d43b927
...
...
@@ -7,8 +7,10 @@ class Projects::PipelinesController < Projects::ApplicationController
def
index
@scope
=
params
[
:scope
]
@all_pipelines
=
project
.
ci_commits
@pipelines
=
PipelinesFinder
.
new
(
project
).
execute
(
@all_pipelines
,
@scope
)
all_pipelines
=
project
.
ci_commits
@pipelines_count
=
all_pipelines
.
count
@running_or_pending_count
=
all_pipelines
.
running_or_pending
.
count
@pipelines
=
PipelinesFinder
.
new
(
project
).
execute
(
all_pipelines
,
@scope
)
@pipelines
=
@pipelines
.
order
(
id: :desc
).
page
(
params
[
:page
]).
per
(
30
)
end
...
...
@@ -22,7 +24,7 @@ class Projects::PipelinesController < Projects::ApplicationController
rescue
ArgumentError
=>
e
@error
=
e
.
message
render
'new'
rescue
=>
e
rescue
@error
=
'Undefined error'
render
'new'
end
...
...
app/models/project.rb
View file @
0d43b927
...
...
@@ -354,7 +354,7 @@ class Project < ActiveRecord::Base
join_body
=
"INNER JOIN (
SELECT project_id, COUNT(*) AS amount
FROM notes
WHERE created_at >=
#{
sanitize
(
since
)
}
WHERE created_at >=
#{
sanitize
(
since
)
}
project.ci_commits
GROUP BY project_id
) join_note_counts ON projects.id = join_note_counts.project_id"
...
...
app/services/ci/create_pipeline_service.rb
View file @
0d43b927
...
...
@@ -39,4 +39,4 @@ module Ci
@pipeline
||=
project
.
ci_commits
.
new
(
sha:
commit
.
id
,
ref:
params
[
:ref
],
before_sha:
Gitlab
::
Git
::
BLANK_SHA
)
end
end
end
\ No newline at end of file
end
app/views/projects/commit/_ci_stage.html.haml
View file @
0d43b927
...
...
@@ -6,8 +6,9 @@
-
status
=
latest
.
status
%span
{
class:
"ci-status-link ci-status-icon-#{status}"
}
=
ci_icon_for_status
(
status
)
=
stage
.
titleize
.
pluralize
-
if
stage
=
stage
.
titleize
.
pluralize
=
render
latest
.
ordered
,
coverage:
@project
.
build_coverage_enabled?
,
tage:
false
,
ref:
false
,
allow_retry:
true
=
render
retried
.
ordered
,
coverage:
@project
.
build_coverage_enabled?
,
stage:
false
,
ref:
false
,
retried:
true
%tr
...
...
app/views/projects/pipelines/index.html.haml
View file @
0d43b927
...
...
@@ -7,13 +7,13 @@
=
link_to
project_pipelines_path
(
@project
)
do
All
%span
.badge.js-totalbuilds-count
=
number_with_delimiter
(
@
all_pipelines
.
count
)
=
number_with_delimiter
(
@
pipelines_
count
)
%li
{
class:
(
'active'
if
@scope
==
'running'
)}
=
link_to
project_pipelines_path
(
@project
,
scope: :running
)
do
Running
%span
.badge.js-running-count
=
number_with_delimiter
(
@
all_pipelines
.
running_or_pending
.
count
)
=
number_with_delimiter
(
@
running_or_pending_
count
)
%li
{
class:
(
'active'
if
@scope
==
'branches'
)}
=
link_to
project_pipelines_path
(
@project
,
scope: :branches
)
do
...
...
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