-
Notifications
You must be signed in to change notification settings - Fork 139
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #309 from IBM/releasing
Some new thoughts on cutting a release, especially scripts/release.sh
- Loading branch information
Showing
57 changed files
with
413 additions
and
234 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -132,3 +132,4 @@ | |
"hash": null | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# Release Management | ||
|
||
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: | ||
|
||
1. `.make.versions` contains the version to be used when publishing the **next** release. | ||
1. The main branch always has the version suffix set to .dev<N>, which | ||
allows intermediate publishing from the dev branch using version X.Y.Z.dev<N>. | ||
2. In general, common version number is used for all published pypi wheels and docker images. | ||
3. The `scripts/release.sh` script automates the following: | ||
1. Creating a `release/vX.Y.Z` branch and `vX.Y.Z` tag | ||
2. Nulling out the version suffix in the new branch's `.make.version` file. | ||
3. Applying the unsuffixed versions to the artifacts published from the repo. | ||
4. Building and publishing the wheels to pypi and images to a docker registry. | ||
5. Incrementing the minor version and resetting the suffix in the main branch. | ||
|
||
# Cutting the release | ||
Creating the release requires running the `release.sh` script and optionally | ||
generating a release on github. The latter can be performed manually | ||
once the `release.sh` script has done its work. | ||
|
||
## release.sh | ||
Running `release.sh` requires credentials to publish to the various cloud locations. | ||
|
||
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](https://packaging.python.org/en/latest/specifications/pypirc/) for details. | ||
|
||
To see the version that will be published, | ||
``` | ||
make DPK_VERSION_SUFFIX= show-version | ||
``` | ||
This will print for example, 1.2.3. | ||
|
||
To generate the release : | ||
```shell | ||
bash scripts/release.sh | ||
``` | ||
|
||
## Github release | ||
After running the `release.sh` script, to create tag `vX.Y.Z` and branch `releases/vX.Y.Z` | ||
1. Go to the [releases page](https://github.com/IBM/data-prep-kit/releases). | ||
2. Select `Draft a new release` | ||
3. Select `Choose a tag -> vX.Y.Z` | ||
4. Press `Generate release notes` | ||
5. Add a title (e.g., Release X.Y.Z) | ||
6. Add any additional relese notes. | ||
7. Press `Publish release` | ||
|
||
|
Oops, something went wrong.