.gitlab-ci.yml
changeset 376 3a229c50bde7
parent 375 39821b50c994
child 377 92d8b4611335
equal deleted inserted replaced
375:39821b50c994 376:3a229c50bde7
     1 image: python:3.5
     1 image: python:3.5
     2 
     2 
     3 stages:
     3 stages:
     4     - build
     4     - build
     5     - quality
     5     - test
     6 
     6 
     7 before_script:
     7 before_script:
     8     - export http_proxy=http://172.17.0.1:3128/
     8     - export http_proxy=http://172.17.0.1:3128/
       
     9     - export HTTP_PROXY=http://172.17.0.1:3128/
     9     - export https_proxy=http://172.17.0.1:3128/
    10     - export https_proxy=http://172.17.0.1:3128/
       
    11     - export HTTPS_PROXY=http://172.17.0.1:3128/
    10 
    12 
    11 test:
    13 build:
    12     stage: build
    14     stage: build
    13     script:
    15     script:
    14         - python3.5 bootstrap.py --buildout-version=2.12.0
    16         - python3.5 bootstrap.py --buildout-version=2.12.0
    15         - ./bin/buildout
    17         - ./bin/buildout
    16         - ./bin/test
    18         - ./bin/test
    17 
    19 
    18 pylint:
    20 pylint:
    19     stage: quality
    21     stage: test
    20     allow_failure: true
    22     allow_failure: true
    21     script:
    23     script:
    22         - pip install pylint --quiet
    24         - pip install pylint --quiet
    23         - pylint src/
    25         - pylint src/
    24 
    26 
    25 codequality:
    27 codequality:
    26     stage: quality
    28     stage: test
    27     allow_failure: true
    29     include:
    28     image: docker:latest
    30         - template: Code-Quality.gitlab-ci.yml
    29     variables:
       
    30         DOCKER_DRIVER: overlay2
       
    31     services:
       
    32         - docker:dind
       
    33     script:
       
    34         - cat /etc/hosts
       
    35         - nslookup xgit98-000.dev-dsm.onf.fr
       
    36         - docker pull codeclimate/codeclimate
       
    37         - docker run
       
    38             --env CODECLIMATE_CODE="$PWD"
       
    39             --volume "$PWD":/code
       
    40             --volume /var/run/docker.sock:/var/run/docker.sock
       
    41             --volume /tmp/cc:/tmp/cc codeclimate/codeclimate analyze -f json > codeclimate.json
       
    42     artifacts:
       
    43         paths:
       
    44             - codeclimate.json