.gitlab-ci.yml
branchdev-tf
changeset 420 b881e57cf6a5
parent 418 55fc762a7afa
child 431 c8b8b126bb32
equal deleted inserted replaced
419:05ff71a02b2d 420:b881e57cf6a5
    52 
    52 
    53 quality:
    53 quality:
    54     stage: quality
    54     stage: quality
    55     allow_failure: true
    55     allow_failure: true
    56     image: docker:stable
    56     image: docker:stable
       
    57     services:
       
    58         - docker:stable-dind
    57     variables:
    59     variables:
    58         DOCKER_DRIVER: overlay2
    60         DOCKER_DRIVER: overlay2
    59     services:
    61         DOCKER_TLS_CERTDIR: ""
    60         - docker:stable-dind
       
    61     script:
    62     script:
    62         - export SP_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/')
    63         - |
       
    64             if ! docker info &>/dev/null; then
       
    65               if [ -z "$DOCKER_HOST" -a "$KUBERNETES_PORT" ]; then
       
    66                 export DOCKER_HOST='tcp://localhost:2375'
       
    67               fi
       
    68             fi
    63         - docker run
    69         - docker run
    64             --env SOURCE_CODE="$PWD"
    70             --env SOURCE_CODE="$PWD"
    65             --volume "$PWD":/code
    71             --volume "$PWD":/code
    66             --volume /var/run/docker.sock:/var/run/docker.sock
    72             --volume /var/run/docker.sock:/var/run/docker.sock
    67             "registry.gitlab.com/gitlab-org/security-products/codequality:$SP_VERSION" /code
    73             "registry.gitlab.com/gitlab-org/security-products/codequality:12-0-stable" /code
    68     artifacts:
    74     artifacts:
    69         reports:
    75         reports:
    70             codequality: gl-code-quality-report.json
    76             codequality: gl-code-quality-report.json
       
    77         expire_in: 1 week
       
    78     dependencies: []
       
    79     only:
       
    80         refs:
       
    81             - branches
       
    82             - tags
       
    83     except:
       
    84         variables:
       
    85             - $CODE_QUALITY_DISABLED