summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorJavier Jardón <jjardon@gnome.org>2018-04-24 01:07:36 +0100
committerJavier Jardón <jjardon@gnome.org>2018-04-25 09:29:55 +0100
commitae927b813e37655a8c270431c3dfa21e2b2f1210 (patch)
treec871f76a601fa434ca7da9b8870dfdb9fca4e5ac /.gitlab-ci.yml
parentb6a643138602e43f2c0fd218adfc7a77c79dd82d (diff)
downloadbuildstream-ae927b813e37655a8c270431c3dfa21e2b2f1210.tar.gz
.gitlab-ci.yml: Add job to analyze project code quality with Code Climate CLI
See #431
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml22
1 files changed, 22 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 05848a4fd..0941ccb6e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -185,6 +185,28 @@ docs:
# Post stage #
#####################################################
+# Check code quality with codeclimate
+# This needs some refactoring; we probably just want to provide the codeclimate.json directly
+# as an output of radon, with some conversion
+#
+codequality:
+ image: docker:stable
+ stage: post
+ variables:
+ DOCKER_DRIVER: overlay2
+ allow_failure: true
+ services:
+ - docker:stable-dind
+ script:
+ - export SP_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/')
+ - docker run
+ --env SOURCE_CODE="$PWD"
+ --volume "$PWD":/code
+ --volume /var/run/docker.sock:/var/run/docker.sock
+ "registry.gitlab.com/gitlab-org/security-products/codequality:$SP_VERSION" /code
+ artifacts:
+ paths: [codeclimate.json]
+
# Collate coverage reports
#
coverage: