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
6d2a6139
Commit
6d2a6139
authored
May 24, 2018
by
Achilleas Pipinellis
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '5779_rename_code_quality_job_and_artifact' into 'master'
Rename code quality job and artifact. See merge request gitlab-org/gitlab-ce!19049
parents
04efc4ea
8c8a794f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
15 deletions
+22
-15
code_climate.md
doc/ci/examples/code_climate.md
+13
-6
index.md
doc/topics/autodevops/index.md
+2
-2
quick_start_guide.md
doc/topics/autodevops/quick_start_guide.md
+2
-2
mock_data.js
spec/javascripts/pipelines/mock_data.js
+1
-1
Auto-DevOps.gitlab-ci.yml
vendor/gitlab-ci-yml/Auto-DevOps.gitlab-ci.yml
+4
-4
No files found.
doc/ci/examples/code_climate.md
View file @
6d2a6139
...
...
@@ -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
`codequality`
:
Once you set up the Runner, add a new job to
`.gitlab-ci.yml`
, called
`code
_
quality`
:
```
yaml
codequality
:
code
_
quality
:
image
:
docker:stable
variables
:
DOCKER_DRIVER
:
overlay2
...
...
@@ -23,20 +23,27 @@ codequality:
--volume /var/run/docker.sock:/var/run/docker.sock
"registry.gitlab.com/gitlab-org/security-products/codequality:$SP_VERSION" /code
artifacts
:
paths
:
[
codeclimate
.json
]
paths
:
[
gl-code-quality-report
.json
]
```
The above example will create a
`codequality`
job in your CI/CD pipeline which
The above example will create a
`code
_
quality`
job in your CI/CD pipeline which
will scan your source code for code quality issues. The report will be saved
as an artifact that you can later download and analyze.
TIP:
**Tip:**
Starting with
[
GitLab Starter
][
ee
]
9.3, this information will
be automatically extracted and shown right in the merge request widget. To do
so, the CI/CD job must be named
`codequality`
and the artifact path must be
`
codeclimate
.json`
.
so, the CI/CD job must be named
`code
_
quality`
and the artifact path must be
`
gl-code-quality-report
.json`
.
[
Learn more on code quality diffs in merge requests
](
https://docs.gitlab.com/ee/user/project/merge_requests/code_quality_diff.html
)
.
CAUTION:
**Caution:**
Code Quality was previously using
`codeclimate`
and
`codequality`
for job name and
`codeclimate.json`
for the artifact name. While these old names
are still maintained they have been deprecated with GitLab 11.0 and may be removed
in next major release, GitLab 12.0. You are advised to update your current
`.gitlab-ci.yml`
configuration to reflect that change.
[
cli
]:
https://github.com/codeclimate/codeclimate
[
dind
]:
../docker/using_docker_build.md#use-docker-in-docker-executor
[
ee
]:
https://about.gitlab.com/products/
doc/topics/autodevops/index.md
View file @
6d2a6139
...
...
@@ -220,8 +220,8 @@ tests, it's up to you to add them.
### Auto Code Quality
Auto Code Quality uses the
open source
[
`codeclimate` image
](
https://hub.docker.com/r/codeclimate/codeclimate/
)
to run
Auto Code Quality uses the
[
Code Quality image
](
https://gitlab.com/gitlab-org/security-products/codequality
)
to run
static analysis and other code checks on the current code. The report is
created, and is uploaded as an artifact which you can later download and check
out.
...
...
doc/topics/autodevops/quick_start_guide.md
View file @
6d2a6139
...
...
@@ -126,10 +126,10 @@ Next, a pipeline needs to be triggered. Since the test project doesn't have a
manually visit
`https://gitlab.com/<username>/minimal-ruby-app/pipelines/new`
,
where
`<username>`
is your username.
This will create a new pipeline with several jobs:
`build`
,
`test`
,
`codequality`
,
This will create a new pipeline with several jobs:
`build`
,
`test`
,
`code
_
quality`
,
and
`production`
. The
`build`
job will create a Docker image with your new
change and push it to the Container Registry. The
`test`
job will test your
changes, whereas the
`codequality`
job will run static analysis on your changes.
changes, whereas the
`code
_
quality`
job will run static analysis on your changes.
Finally, the
`production`
job will deploy your changes to a production application.
Once the deploy job succeeds you should be able to see your application by
...
...
spec/javascripts/pipelines/mock_data.js
View file @
6d2a6139
...
...
@@ -217,7 +217,7 @@ export const pipelineWithStages = {
browse_path
:
'/gitlab-org/gitlab-ee/-/jobs/62411442/artifacts/browse'
,
},
{
name
:
'codequality'
,
name
:
'code
_
quality'
,
expired
:
false
,
expire_at
:
'2018-04-18T14:16:24.484Z'
,
path
:
'/gitlab-org/gitlab-ee/-/jobs/62411441/artifacts/download'
,
...
...
vendor/gitlab-ci-yml/Auto-DevOps.gitlab-ci.yml
View file @
6d2a6139
...
...
@@ -77,7 +77,7 @@ test:
only
:
-
branches
codequality
:
code
_
quality
:
image
:
docker:stable
variables
:
DOCKER_DRIVER
:
overlay2
...
...
@@ -86,9 +86,9 @@ codequality:
-
docker:stable-dind
script
:
-
setup_docker
-
code
climate
-
code
_quality
artifacts
:
paths
:
[
codeclimate
.json
]
paths
:
[
gl-code-quality-report
.json
]
performance
:
stage
:
performance
...
...
@@ -409,7 +409,7 @@ rollout 100%:
./clair-scanner -c http://docker:6060 --ip $(hostname -i) -r gl-container-scanning-report.json -l clair.log -w clair-whitelist.yml ${CI_APPLICATION_REPOSITORY}:${CI_APPLICATION_TAG} || true
}
function code
climate
() {
function code
_quality
() {
docker run --env SOURCE_CODE="$PWD" \
--volume "$PWD":/code \
--volume /var/run/docker.sock:/var/run/docker.sock \
...
...
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