Tried another codequality syntax...
authorThierry Florac <tflorac@ulthar.net>
Fri, 28 Jun 2019 11:49:47 +0200
changeset 383 7f5d40182b58
parent 382 18cd519c3d97
child 384 a4884c96f5af
Tried another codequality syntax...
.gitlab-ci.yml
--- 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