From a0ef01c8724b6f20b49481d19e58f5ddeb993c82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Coutable?= Date: Wed, 21 Feb 2018 16:25:22 +0100 Subject: Optimize and improve the inline documentation for the codequality job MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémy Coutable --- .gitlab-ci.yml | 4 +++- scripts/codequality | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 74dfb9dba6e..ae762e7aa6e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -619,7 +619,9 @@ codequality: cache: {} dependencies: [] script: - - ./scripts/codequality analyze -f json > codeclimate.json || true + - ./scripts/codequality analyze -f json > raw_codeclimate.json || true + # The following line keeps only the fields used in the MR widget, reducing the JSON artifact size + - cat raw_codeclimate.json | docker run -i stedolan/jq -c 'map({check_name,description,fingerprint,location})' > codeclimate.json artifacts: paths: [codeclimate.json] expire_in: 1 week diff --git a/scripts/codequality b/scripts/codequality index 9fa692999f3..2f3ccef7d2d 100755 --- a/scripts/codequality +++ b/scripts/codequality @@ -8,6 +8,7 @@ code_path=$(pwd) # it will break codequality json file [ "$CI" != "" ] || docker_tty="--tty" +# The codebase and instructions for the following image can be found at https://gitlab.com/gitlab-org/codeclimate-rubocop/wikis/home docker pull dev.gitlab.org:5005/gitlab/gitlab-build-images:gitlab-codeclimate-rubocop-0-52-1 > /dev/null docker tag dev.gitlab.org:5005/gitlab/gitlab-build-images:gitlab-codeclimate-rubocop-0-52-1 codeclimate/codeclimate-rubocop:gitlab-codeclimate-rubocop-0-52-1 > /dev/null -- cgit v1.2.3