-
Notifications
You must be signed in to change notification settings - Fork 16
Releasing
Zdeněk Materna edited this page Jul 11, 2022
·
6 revisions
This guide is mainly for maintainers of the repository and documents procedures that are necessary to make (high-quality) releases.
- Make sure
VERSION
andCHANGELOG.md
files are up-to-date and in sync. - Never release locally modified stuff - first merge changes and then do a release (to make sure that CI is happy).
- Make sure that there are no cyclic dependencies between packages (not checked so far by CI).
- Build and test docker images.
- The image tag is specified in
src/docker/service_name/BUILD
file - keep that in sync with the Python package version. - Build images using
./pants package src/docker/service_name/Dockerfile
. - Test them locally (there are no automated tests for Docker images so far).
- The image tag is specified in
- Generate Python packages, push them to Test PyPI, and try to install them in a clean virtual environment.
- Generate Python packages (
.whl
,.tar.gz
) using./pants package src/python/SERVICE_NAME:SERVICE_NAME_dist
(for a specific one) or./pants filter --target-type=python_distribution :: | xargs ./pants package
(all). The packages are created in thedist
folder. - To upload a package to the test server (for verification), use
twine upload --repository testpypi PACKAGE_NAME-version*
(e.g.arcor2_execution-0.19.3*
which will upload botharcor2_execution-0.19.3-py38-none-any.whl
andarcor2_execution-0.19.3.tar.gz
files). - Create a new virtual environment (
python3.9 -m venv release_test_venv
), activate it (source release_test_venv/bin/activate
) and try to install released Python package from Test PyPI (pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ your-package
).
- Generate Python packages (
- Create a GitHub release for each released package with the tag and the name PACKAGE_NAME/VERSION (e.g. arcor2_execution/0.19.3).
- Attach previously generated packages as assets.
- Publish Docker images using
./pants publish src/docker/service_name/Dockerfile
(to be able to upload an image to docker hub, you need to be logged in usingdocker login
). - Upload previously created Python packages to PyPI.
- Using
twine upload --repository pypi PACKAGE_NAME
. - To upload the packages, you need credentials for robo_fit.
- WARNING - once you upload a package with a certain version to the PyPI, it could not be updated anymore and you will have to release a new version, so make double sure you upload the correct package
- Using
- Update the main README.
- Update
docker-compose.yml
files with new versions of services.