.gitlab-ci.yml
changeset 404 3f249488b3ff
parent 386 15801a3108dc
child 408 cf2304af0fab
equal deleted inserted replaced
403:f5bfec044a1a 404:3f249488b3ff
    24         - pip install pylint --quiet
    24         - pip install pylint --quiet
    25         - pylint src/pyams_utils/
    25         - pylint src/pyams_utils/
    26 
    26 
    27 quality:
    27 quality:
    28     stage: test
    28     stage: test
    29     image: docker:latest
    29     image: docker:stable
    30     variables:
    30     variables:
    31         DOCKER_DRIVER: overlay
    31         DOCKER_DRIVER: overlay2
    32     allow_failure: true
    32     allow_failure: true
    33     services:
    33     services:
    34         - docker:dind
    34         - docker:stable-dind
    35     script:
    35     script:
    36         - docker pull codeclimate/codeclimate
    36         - export SP_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/')
    37         - VOLUME_PATH=/tmp/builds"$(echo $PWD | sed 's|^/[^/]*||')"
    37         - docker run
    38         - docker run -v /tmp/cc:/tmp/cc -v $VOLUME_PATH:/code -v /var/run/docker.sock:/var/run/docker.sock codeclimate/codeclimate validate-config
    38             --env SOURCE_CODE="$PWD"
    39         - echo $PWD
    39             --volume "$PWD":/code
    40         - 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 -f json >codeclimate.json
    40             --volume /var/run/docker.sock:/var/run/docker.sock
       
    41             "registry.gitlab.com/gitlab-org/security-products/codequality:$SP_VERSION" /code
    41     artifacts:
    42     artifacts:
    42         reports:
    43         reports:
    43             codequality: codeclimate.json
    44             codequality: gl-code-quality-report.json