.gitlab-ci.yml
changeset 383 7f5d40182b58
parent 381 783188a98bcb
child 384 a4884c96f5af
--- a/.gitlab-ci.yml	Wed Jun 26 11:12:00 2019 +0200
+++ b/.gitlab-ci.yml	Fri Jun 28 11:49:47 2019 +0200
@@ -24,6 +24,26 @@
         - pip install pylint --quiet
         - pylint src/pyams_utils/
 
+quality:
+    stage: test
+    image: docker:latest
+    variables:
+        DOCKER_DRIVER: overlay
+    allow_failure: true
+    services:
+        - docker:dind
+    script:
+        - docker pull codeclimate/codeclimate
+        - VOLUME_PATH=/tmp/builds"$(echo $PWD | sed 's|^/[^/]*||')"
+        - docker run -v /tmp/cc:/tmp/cc -v $VOLUME_PATH:/code -v /var/run/docker.sock:/var/run/docker.sock codeclimate/codeclimate validate-config
+        - ls -lash $PWD
+        - echo $PWD
+        - docker run --env CODECLIMATE_CODE="$VOLUME_PATH" -v /tmp/cc:/tmp/cc -v $VOLUME_PATH:/code -v /var/run/docker.sock:/var/run/docker.sock codeclimate/codeclimate analyze
+        - ls -lash $PWD
+    artifacts:
+        reports:
+            codequality: codeclimate.json
+
 #quality:
 #    stage: test
 #    image: docker:stable