.gitlab-ci.yml
branchdev-tf
changeset 420 b881e57cf6a5
parent 418 55fc762a7afa
child 431 c8b8b126bb32
--- a/.gitlab-ci.yml	Sat Nov 23 14:51:46 2019 +0100
+++ b/.gitlab-ci.yml	Mon Nov 25 09:37:25 2019 +0100
@@ -54,17 +54,32 @@
     stage: quality
     allow_failure: true
     image: docker:stable
+    services:
+        - docker:stable-dind
     variables:
         DOCKER_DRIVER: overlay2
-    services:
-        - docker:stable-dind
+        DOCKER_TLS_CERTDIR: ""
     script:
-        - export SP_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/')
+        - |
+            if ! docker info &>/dev/null; then
+              if [ -z "$DOCKER_HOST" -a "$KUBERNETES_PORT" ]; then
+                export DOCKER_HOST='tcp://localhost:2375'
+              fi
+            fi
         - 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
+            "registry.gitlab.com/gitlab-org/security-products/codequality:12-0-stable" /code
     artifacts:
         reports:
             codequality: gl-code-quality-report.json
+        expire_in: 1 week
+    dependencies: []
+    only:
+        refs:
+            - branches
+            - tags
+    except:
+        variables:
+            - $CODE_QUALITY_DISABLED