The purpose of this document is to outline the release process for the HCP Terraform Operator.
The Semantic Versioning agreement is being followed by this project. Further details can be found here. During the alpha or beta stages, the pre-release versions are not separated by dots. For example, 2.0.0-alpha1
or 2.0.0-beta5
.
To create a new release, adhere to the following steps:
-
Switch to the
main
branch and fetch the latest changes.$ git switch main $ git pull
-
Generate the version number that will be released. Throughout the following steps, it will be denoted as
<SEMVER>
.$ export HCP_TF_OPERATOR_RELEASE_VERSION=`changie next auto`
-
Create a new branch from the
main
. The branch name is required to adhere to the following template:release/v<SEMVER>
.$ git checkout -b release/v$HCP_TF_OPERATOR_RELEASE_VERSION
-
Modify the
version/VERSION
file to reflect the version number that you plan to release.$ echo $HCP_TF_OPERATOR_RELEASE_VERSION > version/VERSION
-
Update the
CHANGELOG
file with the change that were made since the last release.$ changie batch auto $ changie merge
-
Execute the script update-helm-chart.sh to update the
Chart.yaml
file and match the desired release number. The values ofversion
andappVersion
will be updated accordingly to the value.$ scripts/update-helm-chart.sh
-
Update the Helm Chart
README.md
file.$ make helm-docs
-
Commit and push all changes that were made.
$ git add -A $ git commit -m "v$HCP_TF_OPERATOR_RELEASE_VERSION" $ git push
-
Create a pull request against the
main
branch and follow the standard code review and merge procedures. -
After merging the release branch into the
main
branch, a git tag should have been automatically created for the new release version number. The version number in the tag must correspond with the<SEMVER>
of the merged release branch name. Confirm this success by viewing the repository tags. -
Follow the CRT Usage guide to promote the release to the staging and production states.