From 1f941ee0b09af952c5d90ed825789344896f1495 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Mon, 12 Jun 2017 15:34:59 +0300 Subject: [PATCH] Add codeclimate job to .gitlab-ci.yml Signed-off-by: Dmitriy Zaporozhets --- .gitlab-ci.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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]