|
@ -20,17 +20,22 @@ build: |
|
|
|
|
|
|
|
|
codequality: |
|
|
codequality: |
|
|
stage: codequality |
|
|
stage: codequality |
|
|
image: docker:latest |
|
|
image: docker:stable |
|
|
variables: |
|
|
variables: |
|
|
DOCKER_DRIVER: overlay |
|
|
DOCKER_DRIVER: overlay2 |
|
|
|
|
|
allow_failure: true |
|
|
services: |
|
|
services: |
|
|
- docker:dind |
|
|
- docker:stable-dind |
|
|
script: |
|
|
script: |
|
|
- docker pull codeclimate/codeclimate |
|
|
- export SP_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/') |
|
|
- docker run --env CODECLIMATE_CODE="$PWD" --volume "$PWD":/code --volume /var/run/docker.sock:/var/run/docker.sock --volume /tmp/cc:/tmp/cc codeclimate/codeclimate init |
|
|
- docker run |
|
|
- docker run --env CODECLIMATE_CODE="$PWD" --volume "$PWD":/code --volume /var/run/docker.sock:/var/run/docker.sock --volume /tmp/cc:/tmp/cc codeclimate/codeclimate analyze -f json > codeclimate.json |
|
|
--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: |
|
|
artifacts: |
|
|
paths: [codeclimate.json] |
|
|
reports: |
|
|
|
|
|
codequality: gl-code-quality-report.json |
|
|
|
|
|
|
|
|
deploy: |
|
|
deploy: |
|
|
stage: deploy |
|
|
stage: deploy |
|
|