From 5ccd3bec955c1869ad621d352c6509365f2077dc Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Wed, 21 Feb 2018 09:48:56 +0000 Subject: Merge branch 'improve-codequality-job' into 'master' Simplify the codequality job See merge request gitlab-org/gitlab-ee!4602 --- .gitlab-ci.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to '.gitlab-ci.yml') diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9c3556f5cce..f1e28d0928a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -607,22 +607,22 @@ karma: codequality: <<: *except-docs <<: *pull-cache - before_script: [] - image: docker:latest stage: test - variables: - SETUP_DB: "false" - DOCKER_DRIVER: overlay + image: docker:latest + before_script: [] services: - docker:dind + variables: + SETUP_DB: "false" + DOCKER_DRIVER: overlay2 + CODECLIMATE_FORMAT: json + cache: {} + dependencies: [] script: - - cp .rubocop.yml .rubocop.yml.bak - - grep -v "rubocop-gitlab-security" .rubocop.yml.bak > .rubocop.yml - - docker run --env CODECLIMATE_CODE="$PWD" --volume "$PWD":/code --volume /var/run/docker.sock:/var/run/docker.sock --volume /tmp/cc:/tmp/cc dev.gitlab.org:5005/gitlab/gitlab-build-images:gitlab-codeclimate-v2 analyze -f json > raw_codeclimate.json - - cat raw_codeclimate.json | docker run -i stedolan/jq -c 'map({check_name,fingerprint,location})' > codeclimate.json - - mv .rubocop.yml.bak .rubocop.yml + - ./scripts/codequality analyze -f json > codeclimate.json || true artifacts: paths: [codeclimate.json] + expire_in: 1 week sast: <<: *except-docs -- cgit v1.2.1