BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
e83a8187
Unverified
Commit
e83a8187
authored
Sep 06, 2017
by
Maxim Rydkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adds changelog
fix CI fix CI
parent
5b296f81
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
5 deletions
+10
-5
5836-move-lib-ci-into-gitlab-namespace.yml
...ogs/unreleased/5836-move-lib-ci-into-gitlab-namespace.yml
+5
-0
charts.rb
lib/gitlab/ci/charts.rb
+4
-4
project_tree_saver_spec.rb
spec/lib/gitlab/import_export/project_tree_saver_spec.rb
+1
-1
No files found.
changelogs/unreleased/5836-move-lib-ci-into-gitlab-namespace.yml
0 → 100644
View file @
e83a8187
---
title
:
Move `lib/ci` to `lib/gitlab/ci`
merge_request
:
14078
author
:
Maxim Rydkin
type
:
other
lib/gitlab/ci/charts.rb
View file @
e83a8187
...
...
@@ -4,7 +4,7 @@ module Gitlab
module
DailyInterval
def
grouped_count
(
query
)
query
.
group
(
"DATE(
#{
Ci
::
Pipeline
.
table_name
}
.created_at)"
)
.
group
(
"DATE(
#{
::
Ci
::
Pipeline
.
table_name
}
.created_at)"
)
.
count
(
:created_at
)
.
transform_keys
{
|
date
|
date
.
strftime
(
@format
)
}
end
...
...
@@ -18,12 +18,12 @@ module Gitlab
def
grouped_count
(
query
)
if
Gitlab
::
Database
.
postgresql?
query
.
group
(
"to_char(
#{
Ci
::
Pipeline
.
table_name
}
.created_at, '01 Month YYYY')"
)
.
group
(
"to_char(
#{
::
Ci
::
Pipeline
.
table_name
}
.created_at, '01 Month YYYY')"
)
.
count
(
:created_at
)
.
transform_keys
(
&
:squish
)
else
query
.
group
(
"DATE_FORMAT(
#{
Ci
::
Pipeline
.
table_name
}
.created_at, '01 %M %Y')"
)
.
group
(
"DATE_FORMAT(
#{
::
Ci
::
Pipeline
.
table_name
}
.created_at, '01 %M %Y')"
)
.
count
(
:created_at
)
end
end
...
...
@@ -48,7 +48,7 @@ module Gitlab
def
collect
query
=
project
.
pipelines
.
where
(
"? >
#{
Ci
::
Pipeline
.
table_name
}
.created_at AND
#{
Ci
::
Pipeline
.
table_name
}
.created_at > ?"
,
@to
,
@from
)
# rubocop:disable GitlabSecurity/SqlInjection
.
where
(
"? >
#{
::
Ci
::
Pipeline
.
table_name
}
.created_at AND
#{
::
Ci
::
Pipeline
.
table_name
}
.created_at > ?"
,
@to
,
@from
)
# rubocop:disable GitlabSecurity/SqlInjection
totals_count
=
grouped_count
(
query
)
success_count
=
grouped_count
(
query
.
success
)
...
...
spec/lib/gitlab/import_export/project_tree_saver_spec.rb
View file @
e83a8187
...
...
@@ -119,7 +119,7 @@ describe Gitlab::ImportExport::ProjectTreeSaver do
it
'has no when YML attributes but only the DB column'
do
allow_any_instance_of
(
Ci
::
Pipeline
).
to
receive
(
:ci_yaml_file
).
and_return
(
File
.
read
(
Rails
.
root
.
join
(
'spec/support/gitlab_stubs/gitlab_ci.yml'
)))
expect_any_instance_of
(
Ci
::
GitlabCi
YamlProcessor
).
not_to
receive
(
:build_attributes
)
expect_any_instance_of
(
Gitlab
::
Ci
::
YamlProcessor
).
not_to
receive
(
:build_attributes
)
saved_project_json
end
...
...
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