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 --- scripts/codequality | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 scripts/codequality (limited to 'scripts/codequality') diff --git a/scripts/codequality b/scripts/codequality new file mode 100755 index 00000000000..9fa692999f3 --- /dev/null +++ b/scripts/codequality @@ -0,0 +1,18 @@ +#!/bin/sh + +set -eo pipefail + +code_path=$(pwd) + +# docker run --tty will merge stderr and stdout, we don't need this on CI or +# it will break codequality json file +[ "$CI" != "" ] || docker_tty="--tty" + +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 + +exec docker run --rm $docker_tty --env CODECLIMATE_CODE="$code_path" \ + --volume "$code_path":/code \ + --volume /var/run/docker.sock:/var/run/docker.sock \ + --volume /tmp/cc:/tmp/cc \ + "codeclimate/codeclimate:${CODECLIMATE_VERSION:-0.71.1}" "$@" -- cgit v1.2.1 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 --- scripts/codequality | 1 + 1 file changed, 1 insertion(+) (limited to 'scripts/codequality') 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.1