Skip to content

Mongodb Provider Pre release and Release

Abner Garcia edited this page Oct 6, 2021 · 7 revisions

Pre-requisites

Note: When install ruby, be sure that you set into your PATH the ruby bin path, just to avoid errors when try to install the github-changelog-generator

  • after the installation, we need to set an enviroment variable in order connect to github
export CHANGELOG_GITHUB_TOKEN="«your-40-digit-github-token»"

Provider Pre-release

Steps

  • Create another branch to work with the prerelease as a normal jira ticket

  • In the root of the provider project, run the following command:

github_changelog_generator -u mongodb -p terraform-provider-mongodbatlas
  • in the CHANGELOG.MD file, change the unreleased title, using the current template, like this:
## [Unreleased](https://github.com/mongodb/terraform-provider-mongodbatlas/tree/HEAD) <---REMOVE
## [v1.0.2-pre.2](https://github.com/mongodb/terraform-provider-mongodbatlas/tree/v1.0.2-pre.2) (2021-10-04)

[Full Changelog](https://github.com/mongodb/terraform-provider-mongodbatlas/compare/v1.0.1...v1.0.2-pre.1)
  • Commit, push and create the pull request, and wait for the approval before merge to master

  • When it is merged, we need to create a new tag for the pre-release:

git checkout master
git pull origin
git tag v1.0.2-pre.1
git push origin v1.0.2-pre.1
  • Wait for the release job finish in github actions to build the binaries To check if this process was done correctly, in github, go to the code section of the repository > releases > edit Must show the built binaries.

Note: Please check the this is a pre-release option (DON'T FORGET this step, because otherwise, it will reflect this as a normal release in terraform registry

  • Notify to Mongo about the release of the pre-release

Note: Please check if is necessary to update the mongo go client version in go.mod file in case that exists changes needed in the go-client for correct provider run (sometimes this changes wasn't released yet), in this case, notify to the Mongodb team about what are the plans to make the go-client new release

Provider Release

  • For provider release is almost the same steps than the pre-release process above noted.

Steps

  • Create another branch to work with the prerelease as a normal jira ticket

  • In the root of the provider project, run the following command:

github_changelog_generator -u mongodb -p terraform-provider-mongodbatlas
  • in the CHANGELOG.MD file, change the unreleased title, using the current template, like this:
## [Unreleased](https://github.com/mongodb/terraform-provider-mongodbatlas/tree/HEAD) <---REMOVE
## [v1.0.2](https://github.com/mongodb/terraform-provider-mongodbatlas/tree/v1.0.2) (2021-10-04)

[Full Changelog](https://github.com/mongodb/terraform-provider-mongodbatlas/compare/v1.0.2-pre.1...v1.0.2)

Note: Be sure that in case that exists a new mongo go-client release, update the go.mod file in the provider before push the pull request for release

  • Commit, push and create the pull request, and wait for the approval before merge to master

  • When it is merged, we need to create a new tag for the release:

git checkout master
git pull origin
git tag v1.0.2
git push origin v1.0.2
  • Wait for the release job finish in github actions to build the binaries To check if this process was done correctly, in github, go to the code section of the repository > releases > edit Must show the built binaries.

Note: Please uncheck the this is a pre-release option (DON'T FORGET this step, because otherwise, it will reflect this as a pre-release and the provider will not be updated in terraform registry)

  • Notify to Mongo about the release of the release
Clone this wiki locally