Tried to re-implement code quality job
authorThierry Florac <tflorac@ulthar.net>
Fri, 14 Jun 2019 12:41:29 +0200
changeset 368 4f86173ae2cf
parent 367 2c95d34496f5
child 369 d4f04a4bfeeb
Tried to re-implement code quality job
.gitlab-ci.yml
--- a/.gitlab-ci.yml	Fri Jun 14 12:41:06 2019 +0200
+++ b/.gitlab-ci.yml	Fri Jun 14 12:41:29 2019 +0200
@@ -21,3 +21,26 @@
     script:
         - pip install pylint --quiet
         - pylint src/
+
+codequality:
+    stage: quality
+    allow_failure: true
+    image: docker:latest
+    variables:
+        DOCKER_DRIVER: overlay2
+    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 init
+        - 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]