diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-11 06:07:45 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-11 06:07:45 +0000 |
commit | bac547dc784170c7d0e6a5ae14d0ff5d549c31ee (patch) | |
tree | 058a42678ff6f979a45c150c1be23974bce07443 /doc/user/project/merge_requests/code_quality.md | |
parent | 7873bb3c1a2870761c243ea4ebe96f249ad5a319 (diff) | |
download | gitlab-ce-bac547dc784170c7d0e6a5ae14d0ff5d549c31ee.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/user/project/merge_requests/code_quality.md')
-rw-r--r-- | doc/user/project/merge_requests/code_quality.md | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/doc/user/project/merge_requests/code_quality.md b/doc/user/project/merge_requests/code_quality.md index 69bdfe10e3f..9d44f416696 100644 --- a/doc/user/project/merge_requests/code_quality.md +++ b/doc/user/project/merge_requests/code_quality.md @@ -66,6 +66,19 @@ will scan your source code for code quality issues. The report will be saved as that you can later download and analyze. Due to implementation limitations we always take the latest Code Quality artifact available. +It is also possible to override the URL to the Code Quality image by +setting the `CODE_QUALITY_IMAGE` variable. This is particularly useful if you want +to lock in a specific version of Code Quality, or use a fork of it: + +```yaml +include: + - template: Code-Quality.gitlab-ci.yml + +code_quality: + variables: + CODE_QUALITY_IMAGE: "registry.example.com/codequality-fork:latest" +``` + By default, report artifacts are not downloadable. If you need them downloadable on the job details page, you can add `gl-code-quality-report.json` to the artifact paths like so: @@ -125,6 +138,33 @@ code_quality: codequality: gl-code-quality-report.json ``` +In GitLab 12.6, Code Quality switched to the +[new versioning scheme](https://gitlab.com/gitlab-org/security-products/codequality/merge_requests/38). +It is highly recommended to include the Code Quality template as shown in the +[example configuration](#example-configuration), which uses the new versioning scheme. +If not using the template, the `SP_VERSION` variable can be hardcoded to use the +new image versions: + +```yaml +code_quality: + image: docker:stable + variables: + DOCKER_DRIVER: overlay2 + SP_VERSION: 0.85.6 + allow_failure: true + services: + - docker:stable-dind + script: + - docker run + --env SOURCE_CODE="$PWD" + --volume "$PWD":/code + --volume /var/run/docker.sock:/var/run/docker.sock + "registry.gitlab.com/gitlab-org/security-products/codequality:$SP_VERSION" /code + artifacts: + reports: + codequality: gl-code-quality-report.json +``` + For GitLab 11.4 and earlier, the job should look like: ```yaml |