diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b442e48a3d0..26fa9e9fd87 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -527,3 +527,18 @@ cache gems: only: - master@gitlab-org/gitlab-ce - master@gitlab-org/gitlab-ee + +codeclimate: + before_script: [] + image: docker:latest + stage: post-test + variables: + SETUP_DB: "false" + DOCKER_DRIVER: overlay + services: + - docker:dind + script: + - docker pull codeclimate/codeclimate + - 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 + artifacts: + paths: [codeclimate.json]