Commit 073a65fe authored by Lin Jen-Shin's avatar Lin Jen-Shin

Merge branch 'mc/bug/old-codequality-template-autodevops' into 'master'

Use new Code Quality job definition in Auto DevOps

See merge request gitlab-org/gitlab-ce!29475
parents 0eae158c f0773d9e
code_quality: include:
image: docker:stable template: Jobs/Code-Quality.gitlab-ci.yml
allow_failure: true
services:
- docker:stable-dind
variables:
DOCKER_DRIVER: overlay2
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:11-8-stable" /code
artifacts:
reports:
codequality: gl-code-quality-report.json
expire_in: 1 week
...@@ -4,21 +4,24 @@ code_quality: ...@@ -4,21 +4,24 @@ code_quality:
allow_failure: true allow_failure: true
services: services:
- docker:stable-dind - docker:stable-dind
variables:
DOCKER_DRIVER: overlay2
script: script:
- export CQ_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/')
- | - |
if ! docker info &>/dev/null; then if ! docker info &>/dev/null; then
if [ -z "$DOCKER_HOST" -a "$KUBERNETES_PORT" ]; then if [ -z "$DOCKER_HOST" -a "$KUBERNETES_PORT" ]; then
export DOCKER_HOST='tcp://localhost:2375' export DOCKER_HOST='tcp://localhost:2375'
fi fi
fi fi
- | - docker run
docker run --env SOURCE_CODE="$PWD" \ --env SOURCE_CODE="$PWD"
--volume "$PWD":/code \ --volume "$PWD":/code
--volume /var/run/docker.sock:/var/run/docker.sock \ --volume /var/run/docker.sock:/var/run/docker.sock
"registry.gitlab.com/gitlab-org/security-products/codequality:$CQ_VERSION" /code "registry.gitlab.com/gitlab-org/security-products/codequality:11-8-stable" /code
artifacts: artifacts:
paths: [gl-code-quality-report.json] reports:
codequality: gl-code-quality-report.json
expire_in: 1 week
only: only:
- branches - branches
- tags - tags
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment