tutor-discovery/.gitlab-ci.yml
Régis Behmo 6d14a24b04 Fix pypi upload in CI
Twine has been upgraded to 3.0.0 and now depends on gcc. So in order to
deploy ecommerce, we can either install gcc or downgrade twine to 2.0.0.
We chose the latter, as pinning dependencies is a good practice. In the
future, we'll probably have to upgrade twine and install gcc.
2019-11-22 12:54:08 +01:00

41 lines
835 B
YAML

build:image:
script:
- apk add --no-cache docker
- python setup.py install
- tutor plugins enable discovery
- tutor config save
- tutor images build discovery
only:
refs:
- master
tags:
- private
stage: build
deploy:image:
script:
- apk add --no-cache docker
- docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD"
- python setup.py install
- tutor plugins enable discovery
- tutor config save
- tutor images push discovery
only:
refs:
- master
tags:
- private
stage: deploy
deploy:pypi:
script:
- apk add --no-cache make
- pip3 install setuptools==41.6.0 twine==2.0.0
- python3 setup.py sdist
- twine upload --skip-existing dist/tutor-discovery*.tar.gz
only:
refs:
- master
tags:
- private
stage: deploy