Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
049f94a652
commit
8f61d95047
|
@ -28,6 +28,20 @@ Code Quality:
|
|||
- Is available by using [Auto Code Quality](../../../topics/autodevops/stages.md#auto-code-quality), provided by [Auto DevOps](../../../topics/autodevops/index.md).
|
||||
- Can be extended through [Analysis Plugins](https://docs.codeclimate.com/docs/list-of-engines) or a [custom tool](#implementing-a-custom-tool).
|
||||
|
||||
## Summary of features per tier
|
||||
|
||||
Different features are available in different [GitLab tiers](https://about.gitlab.com/pricing/),
|
||||
as shown in the following table:
|
||||
|
||||
| Capability | In Free | In Premium | In Ultimate |
|
||||
|:----------------------------------------------------------------------|:--------------------|:--------------------|:-------------------|
|
||||
| [Configure scanners](#configuring-jobs-using-variables) | **{check-circle}** | **{check-circle}** | **{check-circle}** |
|
||||
| [Integrate custom scanners](#implementing-a-custom-tool) | **{check-circle}** | **{check-circle}** | **{check-circle}** |
|
||||
| [Generate JSON or HTML report artifacts](#generate-an-html-report) | **{check-circle}** | **{check-circle}** | **{check-circle}** |
|
||||
| [See findings in merge request widget](#code-quality-widget) | **{check-circle}** | **{check-circle}** | **{check-circle}** |
|
||||
| [See reports in CI pipelines](#code-quality-reports) | **{dotted-circle}** | **{check-circle}** | **{check-circle}** |
|
||||
| [See findings in merge request diff view](#code-quality-in-diff-view) | **{dotted-circle}** | **{dotted-circle}** | **{check-circle}** |
|
||||
|
||||
## Code Quality Widget
|
||||
|
||||
> [Moved](https://gitlab.com/gitlab-org/gitlab/-/issues/212499) to GitLab Free in 13.2.
|
||||
|
@ -402,19 +416,7 @@ CI/CD variable to `html`. This is useful if you just want to view the report in
|
|||
human-readable format or to publish this artifact on GitLab Pages for even
|
||||
easier reviewing.
|
||||
|
||||
```yaml
|
||||
include:
|
||||
- template: Code-Quality.gitlab-ci.yml
|
||||
|
||||
code_quality:
|
||||
variables:
|
||||
REPORT_FORMAT: html
|
||||
artifacts:
|
||||
paths: [gl-code-quality-report.html]
|
||||
```
|
||||
|
||||
It's also possible to generate both JSON and HTML report files by defining
|
||||
another job and using `extends: code_quality`:
|
||||
To generate both JSON and HTML report files, add another job to your template by using `extends: code_quality`:
|
||||
|
||||
```yaml
|
||||
include:
|
||||
|
@ -428,6 +430,26 @@ code_quality_html:
|
|||
paths: [gl-code-quality-report.html]
|
||||
```
|
||||
|
||||
NOTE:
|
||||
Adding a job means your code is scanned twice: once to generate a JSON report and once to generate an HTML report.
|
||||
|
||||
You can also generate _only_ an HTML report instead of the standard JSON report. To do so, set `REPORT_FORMAT` to `html` in the existing job:
|
||||
|
||||
```yaml
|
||||
include:
|
||||
- template: Code-Quality.gitlab-ci.yml
|
||||
|
||||
code_quality:
|
||||
variables:
|
||||
REPORT_FORMAT: html
|
||||
artifacts:
|
||||
paths: [gl-code-quality-report.html]
|
||||
```
|
||||
|
||||
WARNING:
|
||||
If you only generate an HTML report, you can't see your results in the [merge request widget](#code-quality-widget), [pipeline report](#code-quality-reports), or [diff view](#code-quality-in-diff-view).
|
||||
These features require a JSON report.
|
||||
|
||||
## Extending functionality
|
||||
|
||||
### Using Analysis Plugins
|
||||
|
|
Loading…
Reference in New Issue