6
0
mirror of https://github.com/ChristianLight/tutor.git synced 2024-11-05 12:57:52 +00:00
tutor/.gitlab-ci.yml
Régis Behmo 19d85e621b Fix "distribution was not found and is required by kubernetes" in CI
When running "python setup.py install" in CI, we were getting
"requests distribution was not found and is required by kubernetes"
errors. I can reproduce this issue locally. The error disappears after
the same command is run a second time.

This is a similar issue: https://github.com/pypa/setuptools/issues/498
2020-04-26 00:36:17 +02:00

85 lines
1.5 KiB
YAML

stages:
- test
- build
- deploy:images
- deploy:pypi
- deploy:docs
test:
script:
- apk add --no-cache make
- make ci-install-alpine-requirements
- pip install .
- make ci-install-python-requirements
- make test
build:images:
script:
- apk add --no-cache make
- make ci-install-alpine-requirements
- pip install .
- make ci-build-images
tags:
- private
stage: build
build:docs:
script:
- apk add --no-cache make
- make ci-install-alpine-requirements
- pip install -r requirements/docs.txt
- make docs
artifacts:
paths:
- docs/_build/html
stage: build
build:pypi:
script:
- apk add --no-cache make
- make ci-install-alpine-requirements
- make ci-install-python-requirements
- make package
artifacts:
paths:
- dist/
stage: build
deploy:images:
script:
- apk add --no-cache make
- make ci-install-alpine-requirements
- pip install .
- make ci-push-images
only:
- tags
tags:
- private
stage: deploy:images
deploy:pypi:
script:
- apk add --no-cache make
- make ci-install-alpine-requirements
- make ci-install-python-requirements
- make ci-pypi
dependencies:
- build:pypi
only:
- tags
tags:
- private
stage: deploy:pypi
deploy:docs:
dependencies:
- build:docs
script:
- rm -rf /var/www/docs.tutor.overhang.io
- mv docs/_build/html/ /var/www/docs.tutor.overhang.io
only:
- tags
tags:
- private
stage: deploy:docs