# HG changeset patch # User Thierry Florac # Date 1574671045 -3600 # Node ID b881e57cf6a59a7d33a944aabbaceb6e4186496f # Parent 05ff71a02b2dd77e07771cfa8d99d9bcf84a300e Test code quality update diff -r 05ff71a02b2d -r b881e57cf6a5 .gitlab-ci.yml --- 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