Add Makefile recipe to generate a release using Docker builder.

Add separate requirements file for the build requirements.
GitLab issue #362.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2017-06-07 21:06:38 -04:00
parent 64c6c27957
commit 7497907293
3 changed files with 22 additions and 6 deletions

View File

@@ -24,6 +24,10 @@ help:
@echo "wheel - Build the wheel distribution package."
@echo "release - Package (sdist and wheel) and upload a release."
@echo "test_release - Package (sdist and wheel) and upload to the PyPI test server."
@echo "release_test_via_docker_ubuntu - Package (sdist and wheel) and upload to the PyPI test server using an Ubuntu Docker builder."
@echo "release_test_via_docker_alpine - Package (sdist and wheel) and upload to the PyPI test server using an Alpine Docker builder."
@echo "release_via_docker_ubuntu - Package (sdist and wheel) and upload to PyPI using an Ubuntu Docker builder."
@echo "release_via_docker_alpine - Package (sdist and wheel) and upload to PyPI using an Alpine Docker builder."
@echo "runserver - Run the development server."
@echo "runserver_plus - Run the Django extension's development server."
@@ -33,6 +37,8 @@ help:
@echo "docker_services_off - Stop and delete the Docker production-like services."
@echo "docker_services_frontend - Launch a front end instance that uses the production-like services."
@echo "docker_services_worker - Launch a worker instance that uses the production-like services."
@echo "docker_service_mysql_on - Launch and initialize a MySQL Docker container."
@echo "docker_service_mysql_off - Stop and delete the MySQL Docker container."
@echo "safety_check - Run a package safety check."
@@ -112,6 +118,17 @@ wheel: clean sdist
pip wheel --no-index --no-deps --wheel-dir dist dist/*.tar.gz
ls -l dist
release_test_via_docker_ubuntu:
docker run --rm --name mayan_release -v $(HOME):/host_home:ro -v `pwd`:/host_source -w /source ubuntu:16.04 /bin/bash -c "cp -r /host_source/* . && apt-get update && apt-get install make python-pip -y && pip install -r requirements/build.txt && cp -r /host_home/.pypirc ~/.pypirc && make test_release"
release_via_docker_ubuntu:
docker run --rm --name mayan_release -v $(HOME):/host_home:ro -v `pwd`:/host_source -w /source ubuntu:16.04 /bin/bash -c "cp -r /host_source/* . && apt-get update && apt-get install make python-pip -y && pip install -r requirements/build.txt && cp -r /host_home/.pypirc ~/.pypirc && make release"
release_test_via_docker_alpine:
docker run --rm --name mayan_release -v $(HOME):/host_home:ro -v `pwd`:/host_source -w /source alpine /bin/busybox sh -c "cp -r /host_source/* . && apk update && apk add python2 py2-pip make && pip install -r requirements/build.txt && cp -r /host_home/.pypirc ~/.pypirc && make test_release"
release_via_docker_alpine:
docker run --rm --name mayan_release -v $(HOME):/host_home:ro -v `pwd`:/host_source -w /source alpine /bin/busybox sh -c "cp -r /host_source/* . && apk update && apk add python2 py2-pip make && pip install -r requirements/build.txt && cp -r /host_home/.pypirc ~/.pypirc && make release"
# Dev server

4
requirements/build.txt Normal file
View File

@@ -0,0 +1,4 @@
# requirements/build.txt
twine==1.9.1
wheel==0.29.0

View File

@@ -1,5 +1,4 @@
# requirements/development.txt
-r common.txt
Werkzeug==0.11.15
django-debug-toolbar==1.6
@@ -12,11 +11,7 @@ ipython==5.1.0
safety==0.5.1
pypandoc==1.3.3
transifex-client==0.12.2
twine==1.9.1
wheel==0.29.0
-r build.txt
-r testing-base.txt