Push plugin packages to pypi

This commit is contained in:
Régis Behmo 2019-06-23 22:46:41 +02:00 committed by Régis Behmo
parent 866aae5cfe
commit b7937c8c5b
5 changed files with 20 additions and 13 deletions

View File

@ -26,9 +26,9 @@ build:docs:
build:pypi:
script:
- apk add --no-cache make
- pip install -r requirements/base.txt
- pip install -r requirements/plugins.txt
- make ci-install
- make package
- make package-plugins
artifacts:
paths:
- dist/
@ -48,6 +48,7 @@ deploy:images:
deploy:pypi:
script:
- apk add --no-cache make
- make ci-install
- make ci-pypi
dependencies:
- build:pypi

View File

@ -13,7 +13,7 @@ matrix:
script:
- make ci-info
- make ci-install
- make ci-install-dev
- make test
- make ci-bundle

View File

@ -12,7 +12,10 @@ compile-requirements: ## Compile requirements files
package: ## Build a package ready to upload to pypi
python3 setup.py sdist
test: test-lint test-unit test-format test-package ## Run all tests by decreasing order or priority
package-plugins: ## Build packages for each plugin
cd plugins/minio && python3 setup.py sdist --dist-dir=../../dist/
test: test-lint test-unit test-format test-packages ## Run all tests by decreasing order or priority
test-format: ## Run code formatting tests
black --check --diff $(BLACK_OPTS)
@ -28,8 +31,8 @@ test-unit-core: ## Run unit tests on core
test-unit-plugins: ## Run unit tests on plugins
python3 -m unittest discover plugins/minio/tests
test-package: package ## Test that package can be uploaded to pypi
twine check dist/tutor-openedx-$(shell make version).tar.gz
test-packages: package package-plugins ## Test that packages can be uploaded to pypi
twine check dist/tutor-*.tar.gz
format: ## Format code automatically
black $(BLACK_OPTS)
@ -64,11 +67,16 @@ ci-info: ## Print info about environment
python3 --version
pip3 --version
ci-install: ## Install requirements
ci-install-dev: ## Install requirements
pip3 install -U setuptools twine
pip3 install -r requirements/dev.txt
pip3 install -r requirements/plugins.txt
ci-install:
pip3 install -U setuptools twine
pip3 install -r requirements/base.txt
pip3 install -r requirements/plugins.txt
ci-bundle: ## Create bundle and run basic tests
$(MAKE) bundle
mkdir -p releases/
@ -111,9 +119,8 @@ ci-push-images: ci-config-images ## Push docker images to hub.docker.com
docker login -u "$$DOCKER_USERNAME" -p "$$DOCKER_PASSWORD"
tutor images push all
ci-pypi: ## Push release to pypi
pip install twine
twine upload dist/*.tar.gz
ci-pypi: ## Push packages to pypi
twine upload --skip-existing dist/tutor-*.tar.gz
###### Additional commands

View File

@ -120,7 +120,7 @@ MinIO
~~~~~
::
pip install tutor-minio
tutor plugins enable minio
See the `plugin documentation <https://github.com/overhangio/tutor/tree/master/plugins/minio>`_.

View File

@ -10,8 +10,7 @@ Installation
The plugin is currently bundled with the `binary releases of Tutor <https://github.com/overhangio/tutor/releases>`_. If you have installed Tutor from source, you will have to install this plugin from source, too::
git clone https://github.com/overhangio/tutor/
pip install -e tutor/plugins/minio
pip install tutor-minio
Then, to enable this plugin, run::