[Notes] [Git][BuildGrid/buildgrid][mablanch/51-user-facing-docs] Build and publish documentation from master changes



Title: GitLab

Martin Blanchard pushed to branch mablanch/51-user-facing-docs at BuildGrid / buildgrid

Commits:

1 changed file:

Changes:

  • .gitlab-ci.yml
    ... ... @@ -2,23 +2,27 @@
    2 2
     image: python:3.5-stretch
    
    3 3
     
    
    4 4
     variables:
    
    5
    -  BGD: bgd --verbose
    
    5
    +  BGD: env/bin/bgd --verbose
    
    6 6
     
    
    7 7
     stages:
    
    8 8
       - test
    
    9 9
       - post
    
    10 10
     
    
    11 11
     before_script:
    
    12
    -  - pip3 install setuptools
    
    13
    -  - export PATH=~/.local/bin:${PATH}
    
    14
    -  - pip3 install --user -e .
    
    12
    +  - python3 -m venv env
    
    13
    +  - env/bin/python -m pip install --upgrade setuptools pip
    
    14
    +  - env/bin/python -m pip install --editable .
    
    15 15
     
    
    16
    +
    
    17
    +#
    
    18
    +# Test stage:
    
    16 19
     .tests-template: &linux-tests
    
    17 20
       stage: test
    
    18 21
       variables:
    
    19 22
         PYTEST_ADDOPTS: "--color=yes"
    
    20 23
       script:
    
    21
    -    - python3 setup.py test
    
    24
    +    - env/bin/python -m pip install --editable ".[tests]"
    
    25
    +    - env/bin/python setup.py test
    
    22 26
         - mkdir -p coverage/
    
    23 27
         - cp .coverage.* coverage/coverage."${CI_JOB_NAME}"
    
    24 28
       artifacts:
    
    ... ... @@ -40,29 +44,42 @@ run-dummy-job-debian:
    40 44
       image: buildstream/buildstream-debian
    
    41 45
       <<: *dummy-job
    
    42 46
     
    
    47
    +build-docs:
    
    48
    +  stage: test
    
    49
    +  script:
    
    50
    +    - env/bin/python -m pip install --editable ".[docs]"
    
    51
    +    - env/bin/python setup.py build_sphinx
    
    52
    +    - cp build/sphinx/html public
    
    53
    +  artifacts:
    
    54
    +    paths:
    
    55
    +    - public/
    
    56
    +
    
    43 57
     
    
    58
    +#
    
    59
    +# Post stage:
    
    44 60
     coverage:
    
    45 61
       stage: post
    
    46 62
       coverage: '/TOTAL +\d+ +\d+ +(\d+\.\d+)%/'
    
    47 63
       script:
    
    48
    -    - pip3 install coverage==4.4.0
    
    64
    +    - env/bin/python -m pip install coverage==4.4.0
    
    49 65
         - mkdir report
    
    50 66
         - cd report
    
    51 67
         - cp ../coverage/coverage.* .
    
    52 68
         - ls coverage.*
    
    53
    -    - coverage combine --rcfile=../.coveragerc -a coverage.*
    
    54
    -    - coverage report --rcfile=../.coveragerc -m
    
    69
    +    - env/bin/coverage combine --rcfile=../.coveragerc -a coverage.*
    
    70
    +    - env/bin/coverage report --rcfile=../.coveragerc -m
    
    55 71
       dependencies:
    
    56 72
       - tests-debian-stretch
    
    57 73
     
    
    58
    -# Deploy, only for merges which land on master branch.
    
    74
    +
    
    59 75
     #
    
    76
    +# Deploy stage (master only):
    
    60 77
     pages:
    
    61 78
       stage: post
    
    62 79
       dependencies:
    
    63
    -  - tests-debian-stretch
    
    80
    +  - build-docs
    
    64 81
       script:
    
    65
    -  - mv coverage/ public/
    
    82
    +  - find public/
    
    66 83
       artifacts:
    
    67 84
         paths:
    
    68 85
         - public/
    



  • [Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]