Push plugin packages to pypi
This commit is contained in:
parent
866aae5cfe
commit
b7937c8c5b
|
@ -26,9 +26,9 @@ build:docs:
|
||||||
build:pypi:
|
build:pypi:
|
||||||
script:
|
script:
|
||||||
- apk add --no-cache make
|
- apk add --no-cache make
|
||||||
- pip install -r requirements/base.txt
|
- make ci-install
|
||||||
- pip install -r requirements/plugins.txt
|
|
||||||
- make package
|
- make package
|
||||||
|
- make package-plugins
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- dist/
|
- dist/
|
||||||
|
@ -48,6 +48,7 @@ deploy:images:
|
||||||
deploy:pypi:
|
deploy:pypi:
|
||||||
script:
|
script:
|
||||||
- apk add --no-cache make
|
- apk add --no-cache make
|
||||||
|
- make ci-install
|
||||||
- make ci-pypi
|
- make ci-pypi
|
||||||
dependencies:
|
dependencies:
|
||||||
- build:pypi
|
- build:pypi
|
||||||
|
|
|
@ -13,7 +13,7 @@ matrix:
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- make ci-info
|
- make ci-info
|
||||||
- make ci-install
|
- make ci-install-dev
|
||||||
- make test
|
- make test
|
||||||
- make ci-bundle
|
- make ci-bundle
|
||||||
|
|
||||||
|
|
21
Makefile
21
Makefile
|
@ -12,7 +12,10 @@ compile-requirements: ## Compile requirements files
|
||||||
package: ## Build a package ready to upload to pypi
|
package: ## Build a package ready to upload to pypi
|
||||||
python3 setup.py sdist
|
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
|
test-format: ## Run code formatting tests
|
||||||
black --check --diff $(BLACK_OPTS)
|
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
|
test-unit-plugins: ## Run unit tests on plugins
|
||||||
python3 -m unittest discover plugins/minio/tests
|
python3 -m unittest discover plugins/minio/tests
|
||||||
|
|
||||||
test-package: package ## Test that package can be uploaded to pypi
|
test-packages: package package-plugins ## Test that packages can be uploaded to pypi
|
||||||
twine check dist/tutor-openedx-$(shell make version).tar.gz
|
twine check dist/tutor-*.tar.gz
|
||||||
|
|
||||||
format: ## Format code automatically
|
format: ## Format code automatically
|
||||||
black $(BLACK_OPTS)
|
black $(BLACK_OPTS)
|
||||||
|
@ -64,11 +67,16 @@ ci-info: ## Print info about environment
|
||||||
python3 --version
|
python3 --version
|
||||||
pip3 --version
|
pip3 --version
|
||||||
|
|
||||||
ci-install: ## Install requirements
|
ci-install-dev: ## Install requirements
|
||||||
pip3 install -U setuptools twine
|
pip3 install -U setuptools twine
|
||||||
pip3 install -r requirements/dev.txt
|
pip3 install -r requirements/dev.txt
|
||||||
pip3 install -r requirements/plugins.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
|
ci-bundle: ## Create bundle and run basic tests
|
||||||
$(MAKE) bundle
|
$(MAKE) bundle
|
||||||
mkdir -p releases/
|
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"
|
docker login -u "$$DOCKER_USERNAME" -p "$$DOCKER_PASSWORD"
|
||||||
tutor images push all
|
tutor images push all
|
||||||
|
|
||||||
ci-pypi: ## Push release to pypi
|
ci-pypi: ## Push packages to pypi
|
||||||
pip install twine
|
twine upload --skip-existing dist/tutor-*.tar.gz
|
||||||
twine upload dist/*.tar.gz
|
|
||||||
|
|
||||||
###### Additional commands
|
###### Additional commands
|
||||||
|
|
||||||
|
|
|
@ -120,7 +120,7 @@ MinIO
|
||||||
~~~~~
|
~~~~~
|
||||||
|
|
||||||
::
|
::
|
||||||
|
pip install tutor-minio
|
||||||
tutor plugins enable minio
|
tutor plugins enable minio
|
||||||
|
|
||||||
See the `plugin documentation <https://github.com/overhangio/tutor/tree/master/plugins/minio>`_.
|
See the `plugin documentation <https://github.com/overhangio/tutor/tree/master/plugins/minio>`_.
|
|
@ -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::
|
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 tutor-minio
|
||||||
pip install -e tutor/plugins/minio
|
|
||||||
|
|
||||||
Then, to enable this plugin, run::
|
Then, to enable this plugin, run::
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue