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
b80a0450
Commit
b80a0450
authored
Aug 17, 2017
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ini
parent
55f63361
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
11 additions
and
11 deletions
+11
-11
.gitlab-ci.yml
.gitlab-ci.yml
+1
-1
app/models/ci/build.rb
app/models/ci/build.rb
+1
-1
doc/ci/examples/code_climate.md
doc/ci/examples/code_climate.md
+3
-3
doc/user/project/merge_requests/code_quality_diff.md
doc/user/project/merge_requests/code_quality_diff.md
+3
-3
spec/ee/spec/models/ee/ci/build_spec.rb
spec/ee/spec/models/ee/ci/build_spec.rb
+2
-2
spec/models/ci/pipeline_spec.rb
spec/models/ci/pipeline_spec.rb
+1
-1
No files found.
.gitlab-ci.yml
View file @
b80a0450
...
...
@@ -527,7 +527,7 @@ karma:
-
chrome_debug.log
-
coverage-javascript/
code
climate
:
code
quality
:
<<
:
*except-docs
<<
:
*pull-cache
before_script
:
[]
...
...
app/models/ci/build.rb
View file @
b80a0450
...
...
@@ -37,7 +37,7 @@ module Ci
scope
:with_expired_artifacts
,
->
()
{
with_artifacts
.
where
(
'artifacts_expire_at < ?'
,
Time
.
now
)
}
scope
:last_month
,
->
()
{
where
(
'created_at > ?'
,
Date
.
today
-
1
.
month
)
}
scope
:manual_actions
,
->
()
{
where
(
when: :manual
,
status:
COMPLETED_STATUSES
+
[
:manual
])
}
scope
:codeclimate
,
->
()
{
where
(
name:
'codeclimate'
)
}
scope
:codeclimate
,
->
()
{
where
(
:name
=>
%w[codequality codeclimate]
)
}
mount_uploader
:artifacts_file
,
ArtifactUploader
mount_uploader
:artifacts_metadata
,
ArtifactUploader
...
...
doc/ci/examples/code_climate.md
View file @
b80a0450
...
...
@@ -5,10 +5,10 @@ GitLab CI and Docker.
First, you need GitLab Runner with
[
docker-in-docker executor
][
dind
]
.
Once you set up the Runner, add a new job to
`.gitlab-ci.yml`
, called
`code
climate`
:
Once you set up the Runner, add a new job to
`.gitlab-ci.yml`
, called
`code
quality`
or
`codeclimate`
(DEPRECATED)
:
```
yaml
code
climate
:
code
quality
:
image
:
docker:latest
variables
:
DOCKER_DRIVER
:
overlay
...
...
@@ -22,7 +22,7 @@ codeclimate:
paths
:
[
codeclimate.json
]
```
This will create a
`code
climate
`
job in your CI pipeline and will allow you to
This will create a
`code
quality
`
job in your CI pipeline and will allow you to
download and analyze the report artifact in JSON format.
For GitLab
[
Enterprise Edition Starter
][
ee
]
users, this information can be automatically
...
...
doc/user/project/merge_requests/code_quality_diff.md
View file @
b80a0450
...
...
@@ -28,7 +28,7 @@ For instance, consider the following workflow:
## How it works
In order for the report to show in the merge request, you need to specify a
`code
climate
`
job (exact name) that will analyze the code and upload the resulting
`code
quality
`
job (exact name) that will analyze the code and upload the resulting
`codeclimate.json`
as an artifact. GitLab will then check this file and show
the information inside the merge request.
...
...
@@ -38,11 +38,11 @@ Code Climate display in the merge request.
If the Code Climate report doesn't have anything to compare to, no information
will be displayed in the merge request area. That is the case when you add the
`code
climate
`
job in your
`.gitlab-ci.yml`
for the very first time.
`code
quality
`
job in your
`.gitlab-ci.yml`
for the very first time.
Consecutive merge requests will have something to compare to and the code quality
report will be shown properly.
For more information on how the
`code
climate
`
job should look like, check the
For more information on how the
`code
quality
`
job should look like, check the
example on
[
analyzing a project's code quality with Code Climate CLI
][
cc-docs
]
.
[
ee-1984
]:
https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/1984
...
...
spec/ee/spec/models/ee/ci/build_spec.rb
View file @
b80a0450
...
...
@@ -112,7 +112,7 @@ describe Ci::Build do
create
(
:ci_build
,
:artifacts
,
name:
'code
climate
'
,
name:
'code
quality
'
,
pipeline:
pipeline
,
options:
{
artifacts:
{
...
...
@@ -130,7 +130,7 @@ describe Ci::Build do
create
(
:ci_build
,
:artifacts
,
name:
'code
climate
'
,
name:
'code
quality
'
,
pipeline:
pipeline
,
options:
{}
)
...
...
spec/models/ci/pipeline_spec.rb
View file @
b80a0450
...
...
@@ -1330,7 +1330,7 @@ describe Ci::Pipeline, :mailer do
create
(
:ci_build
,
:artifacts
,
name:
'code
climate
'
,
name:
'code
quality
'
,
pipeline:
pipeline
,
options:
{
artifacts:
{
...
...
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