The intention of this cloud-builder is to assist with managing PyPI packages.
Included tools:
See also documentation for packaging python projects.
This build step invokes /bin/sh
in Google Cloud Build.
Arguments passed to this builder will be passed to /bin/sh
directly. The reason for using shell is due to the numerous supported tools and their nature.
As you know, the interaction with pypi requires credentials. It is recommended to store the password on KMS, then use it as an encrypted resource. See example.
This cloud-builder can assist with the following use cases:
- Sanity build of a python package
- Pushing a package to pypi/test.pypi
- Conditional push of a package - only if a newer version was committed
By default, the Dockerfile is using python 3.7
. To use a different version we can pass a build-arg to the docker build
command.
The supplied cloudbuild will create this builder for versions 2.7
, 3.6
, 3.7
(latest
).
Supported versions are any version that has a python:<version>-alpine
docker image distributed.
Please check examples