|
| 1 | +# Releasing |
| 2 | + |
| 3 | +The purpose of this document is to outline the release process for the Kubernetes Provider for Terraform. |
| 4 | + |
| 5 | +The Semantic Versioning agreement is being followed by this project. Further details can be found [here](https://semver.org/). |
| 6 | + |
| 7 | +## How To Release |
| 8 | + |
| 9 | +To create a new release, adhere to the following steps: |
| 10 | + |
| 11 | +- Decide on the version number that you intend to release. Throughout the following steps, it will be denoted as `<SEMVER>`. |
| 12 | + |
| 13 | +- Switch to the `main` branch and fetch the latest changes: |
| 14 | + |
| 15 | + ```console |
| 16 | + $ git switch main |
| 17 | + $ git pull |
| 18 | + ``` |
| 19 | + |
| 20 | +- Create a new branch from the `main`. The branch name is required to adhere to the following template: `release/v<SEMVER>`. |
| 21 | + |
| 22 | + ```console |
| 23 | + $ git checkout -b release/v<SEMVER> |
| 24 | + ``` |
| 25 | + |
| 26 | +- Generate change log entries: |
| 27 | + |
| 28 | + ```console |
| 29 | + $ make changelog |
| 30 | + ``` |
| 31 | + |
| 32 | +- Update the [`CHANGELOG`](./CHANGELOG.md) file with the output produced in the previous step preceded by the release version and the planned release date expressed as `Mon DD, YYYY` format. The version number in this file must correspond with the `<SEMVER>` of the release branch name. |
| 33 | + |
| 34 | +- Create a pull request against the `main` branch and follow the regular code review and merge procedures. |
| 35 | + |
| 36 | +- After merging the release branch into the `main` one, a git tag with the new release version number needs to be attached to the release commit to start a release process. The version number in the tag must correspond with the `v<SEMVER>` of the merged release branch name. Below is an example of the commands that need to be run in this step: |
| 37 | + |
| 38 | + ```console |
| 39 | + $ git switch main |
| 40 | + $ git pull |
| 41 | + $ git log --pretty=oneline -n 1 |
| 42 | + |
| 43 | + ccd98a787308e6887c97291652430bd083106ccb (HEAD -> main, ...) v<SEMVER> (#XXXX) |
| 44 | + |
| 45 | + $ git tag v<SEMVER> ccd98a787308e6887c97291652430bd083106ccb |
| 46 | + $ git log --pretty=oneline -n 1 |
| 47 | + |
| 48 | + ccd98a787308e6887c97291652430bd083106ccb (..., tag: v<SEMVER>) v<SEMVER> (#XXXX) |
| 49 | + |
| 50 | + $ git push origin v<SEMVER> |
| 51 | + ``` |
| 52 | + |
| 53 | +- Confirm this succeeded by viewing the repository [tags](https://github.com/hashicorp/terraform-provider-kubernetes/tags). |
| 54 | + |
| 55 | +- Monitor the [release](https://github.com/hashicorp/terraform-provider-kubernetes/actions/workflows/release.yaml) action on GitHub. Once it is completed, a new release should be available on the [registry](https://registry.terraform.io/providers/hashicorp/kubernetes/latest) portal within 15-30 minutes. If this does not happen or the action fails, please reach out to the release engineering team to troubleshoot the issue. |
0 commit comments