Release are created from the main repository branch using the version
numbers, including an intermediate version suffix,
defined in .make.versions
.
The following points are important:
- In general, common a version number is used for all published pypi wheels and docker images.
.make.versions
contains the version to be used when publishing the next release.- Whenever
.make.versions
is changed,make set-versions
should be run from the top of the repo.- Corollary:
make set-versions
should ONLY be used from the top of the repo when.make.versions
changes.
- Corollary:
- The main branch always has the version suffix set to .dev<N>, which allows intermediate publishing from the main branch using version X.Y.Z.dev<N>.
- The
scripts/release-branch.sh
script automates creation of a new release branch and tag and version numbers in.make.versions
- Building and publishing is done manually, or soon via a git action, in the branch created by
scripts/release-branch.sh
.- Wheels can only be published once to pypi for a given version.
- Transform and kfp images may be republished to the docker registry.
Creating the release involves
- Creating a release branch and tag and updating the main branch versions.
- Building and publishing pypi library wheels and docker registry image.
- Creating a github release from the release branch and tag.
Each is discussed below.
The scripts/release-branch.sh
is currently run manually to create the branch and tags as follows:
- Creates the
release/vX.Y.Z
and tagvX.Y.Z
whereX.Y.Z
are defined in .make.versions - In the new branch:
- Nulls out the version suffix in the new branch's
.make.version
file. - Applies the unsuffixed versions to the artifacts published from the repo using
make set-versions
.. - Commits and pushes branch and tag
- Nulls out the version suffix in the new branch's
- In the main branch:
- Increments the minor version (i.e. Z+1) and resets the suffix in the main branch to
dev0
in.make.versions
.. - Commits and pushes branch
- Increments the minor version (i.e. Z+1) and resets the suffix in the main branch to
To double-check the version that will be published from the main branch,
git checkout <main branch>
make DPK_VERSION_SUFFIX= show-version
This will print for example, 1.2.3.
To run the script from the top of the repo:
scripts/release-branch.sh
After creating the release branch and tag using the scripts/release-branch.sh
script:
- Switch to a release branch (e.g. releases/v1.2.3) created by the
release-branch.sh
script - Be sure you're at the top of the repository (
.../data-prep-kit
) - Optionally,
make show-version
to see the version that will be published - Running the following, either manually or in a git action
make build
make publish
(See credential requirements below)
For docker registry publishing, the following environment variables/credentials are needed:
- DPK_DOCKER_REGISTRY_USER - user used with the registry defined in DOCKER_HOST in
.make.defaults
- DPK_DOCKER_REGISTRY_KEY - key/password for docker registry user.
To publish to pypi, the credentials in ~/.pypirc
file (let us know if there is a way to do
this with environment variables).
See pypi for details.
After running the release-branch.sh
script, to create tag vX.Y.Z
and branch releases/vX.Y.Z
- Go to the releases page.
- Select
Draft a new release
- Select
Choose a tag -> vX.Y.Z
- Press
Generate release notes
- Add a title (e.g., Release X.Y.Z)
- Add any additional relese notes.
- Press
Publish release