From 9e134d681457ad5aa3d83fadec2509bc216318cb Mon Sep 17 00:00:00 2001 From: Pawel Kosiec Date: Wed, 26 Jan 2022 14:47:56 +0100 Subject: [PATCH 1/3] Update release docs --- community/release.md | 64 ++++++++++++++++++++++++++++++++++++-------- 1 file changed, 53 insertions(+), 11 deletions(-) diff --git a/community/release.md b/community/release.md index f09a5129..764276a9 100644 --- a/community/release.md +++ b/community/release.md @@ -8,20 +8,39 @@ This document describes Capact release process. ## Prerequisites -- Admin role on the `capact`, `hub-manifests` and `website` repositories. -- Disabled branch protection rules for all repositories. This allows the release jobs to commit directly to `main` and release branches. +1. For **all** of the following repositories: - > **NOTE:** Do not forget to re-enable them after creating a release. + - [`capactio/capact`](https://github.com/capactio/capact) + - [`capactio/hub-manifests`](https://github.com/capactio/hub-manifests) + - [`capactio/dashboard`](https://github.com/capactio/dashboard) + - [`capactio/website`](https://github.com/capactio/website) -- An GitHub Environment named `Release` in [`capactio/capact`](https://github.com/capactio/capact), [`capactio/hub-manifests`](https://github.com/capactio/hub-manifests) and [`capactio/website`](https://github.com/capactio/website) repositories with the following secret set: - - `GH_PAT` — GitHub personal access token. Make sure that it has selected `repo` and `write:packages` scopes. Must be in format: `":"` -- In GitHub Environment named `Release` in [`capactio/capact`](https://github.com/capactio/capact) repository add the following secret: - - `GCS_CREDS` — Base64-encoded Google Cloud Platform credentials in JSON format to access Google Cloud Storage for binary and chart releases. Make sure that it has `storage.objects.create` permission. + make sure all of the following prerequisites are met: + + - Admin role for a given repository. + - Disabled branch protection rules. This allows the release jobs to commit directly to `main` and release branches. + - An GitHub Environment named `Release` in a given repository with the following secret set: + - `GH_PAT` — GitHub personal access token. Make sure that it has selected `repo` and `write:packages` scopes. Must be in format: `:` + +1. Moreover, there are additional prerequisites for the [`capactio/capact`](https://github.com/capactio/capact) repository: + + - In GitHub Environment named `Release`, add the following secret: + - `GCS_CREDS` — Google Cloud Platform credentials in JSON format to access Google Cloud Storage for binary and chart releases. Make sure that it has `storage.objects.create` permission. ## Steps Use [Semantic Versioning 2.0.0](https://semver.org/spec/v2.0.0.html) to specify the next Capact release. +### Release Dashboard + +The release of Dashboard is automated and done using a GitHub Action workflow. + +1. Open the [Make release](https://github.com/capactio/dashboard/actions/workflows/make-release.yaml) workflow. +1. Click `Run workflow` and depending on your scenario: + - if making a major/minor release from `main`, select the `main` branch and put the version in SemVer, e.g. `0.5.0`, + - if making a patch release from a release branch, select the given release branch and put the version in SemVer, e.g. `0.5.1`. +1. Click `Run workflow` to start the release workflow. + ### Release Capact container images and binaries The release of Capact container images and binaries is automated and done using a GitHub Action workflow. @@ -30,20 +49,25 @@ The release of Capact container images and binaries is automated and done using 1. Click `Run workflow` and depending on your scenario: - if making a major/minor release from `main`, select the `main` branch and put the version in SemVer, e.g. `0.5.0`, - if making a patch release from a release branch, select the given release branch and put the version in SemVer, e.g. `0.5.1`. + - provide Dashboard image tag from a [`capactio/dashboard`](https://github.com/capactio/dashboard) release build. 1. Click `Run workflow` to start the release workflow. The workflow will prepare the release branch, tag the appropriate commit and create a GitHub Release. [`gren`](https://github.com/github-tools/github-release-notes) is used to create the release notes from merged pull requests. -> *NOTE:* After the release is complete consider removing the `GH_PAT` from the Release environment. - -### Prepare Hub for release +### Release Hub manifests The release of Hub Manifests is automated and done using a GitHub Action workflow. 1. Open the [Make release](https://github.com/capactio/hub-manifests/actions/workflows/make-release.yaml) workflow. -1. Click `Run workflow` and put the version parameter and the runner image tag from a [`capactio/capact`](https://github.com/capactio/capact) build. +1. Click `Run workflow` and put the version parameter and the runner image tag from a [`capactio/capact`](https://github.com/capactio/capact) release build. 1. Click `Run workflow` to start the release workflow. +### Validate the release + +1. Install Capact locally from the version you've just released. +1. Run one of our manifests, such as Mattermost installation. Make sure it passes. +1. Edit the draft release with key highlights and publish it on [`capact` Releases](https://github.com/capactio/capact/releases) page. + ### Release documentation The release of Capact documentation is automated and done using a GitHub Action workflow. @@ -54,3 +78,21 @@ If you release a new major or minor Capact version, follow these steps: 1. Click `Run workflow` to start the release workflow. To read more about documentation versioning, see the [Versioning](https://docusaurus.io/docs/versioning) page on the Docusaurus website. + +### Cleanup + +1. For **all** of the following repositories: + + - [`capactio/capact`](https://github.com/capactio/capact) + - [`capactio/hub-manifests`](https://github.com/capactio/hub-manifests) + - [`capactio/dashboard`](https://github.com/capactio/dashboard) + - [`capactio/website`](https://github.com/capactio/website) + + perform the following steps: + + - Reenable `main` and `release-*` branch protection rules + - Remove `GH_PAT` secret from Release environments + +1. Additionally, for the [`capactio/capact`](https://github.com/capactio/capact) repository, perform the following steps: + + - Remove `GCS_CREDS` secret from Release environments From 15a4bc039e36172e09ceb22edd79aa956a4eccae Mon Sep 17 00:00:00 2001 From: Pawel Kosiec Date: Thu, 27 Jan 2022 16:52:49 +0100 Subject: [PATCH 2/3] Mention some manual steps --- community/release.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/community/release.md b/community/release.md index 764276a9..08c75644 100644 --- a/community/release.md +++ b/community/release.md @@ -66,7 +66,7 @@ The release of Hub Manifests is automated and done using a GitHub Action workflo 1. Install Capact locally from the version you've just released. 1. Run one of our manifests, such as Mattermost installation. Make sure it passes. -1. Edit the draft release with key highlights and publish it on [`capact` Releases](https://github.com/capactio/capact/releases) page. +1. Edit the draft release with key highlights and publish it on the [`capact` Releases](https://github.com/capactio/capact/releases) page. ### Release documentation @@ -79,6 +79,23 @@ If you release a new major or minor Capact version, follow these steps: To read more about documentation versioning, see the [Versioning](https://docusaurus.io/docs/versioning) page on the Docusaurus website. +### Further manual steps + +1. For the [`capactio/website`](https://github.com/capactio/website) repository: Update announcement bar. + 1. Create pull request with announcement banner update (`themeConfig.announcementBar` in the [`docusaurus.config.js`](https://github.com/capactio/website/blob/main/docusaurus.config.js) file). + 1. Get review from any code owner and merge it. +1. For the [`capactio/capact`](https://github.com/capactio/capact) repository: Archive images from Helm charts and add to the GitHub release. + 1. Check out the release branch for the release you created. + 1. Make sure you track `upstream` release branch and you are on the latest commit. + 1. Run the following command: + ```bash + CAPACT_VERSION={version} # e.g. 0.5.0 + capact alpha archive-images helm -v --version ${CAPACT_VERSION} -o ./capact-images-amd64.tar.gz --compress gzip + ``` + 1. Once the archive is ready to upload, navigate to the [`capact` Releases](https://github.com/capactio/capact/releases) page and edit your release. + 1. Upload the archive as another attachment to the release and click **Update release** button. +1. Share the news on our Slack and social media. + ### Cleanup 1. For **all** of the following repositories: From 8a86e564c3ab736fc1d0ff7b4e12c8b22485ed42 Mon Sep 17 00:00:00 2001 From: Pawel Kosiec Date: Fri, 28 Jan 2022 22:41:38 +0100 Subject: [PATCH 3/3] Fix document after review --- community/release.md | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/community/release.md b/community/release.md index 08c75644..e4030206 100644 --- a/community/release.md +++ b/community/release.md @@ -20,7 +20,7 @@ This document describes Capact release process. - Admin role for a given repository. - Disabled branch protection rules. This allows the release jobs to commit directly to `main` and release branches. - An GitHub Environment named `Release` in a given repository with the following secret set: - - `GH_PAT` — GitHub personal access token. Make sure that it has selected `repo` and `write:packages` scopes. Must be in format: `:` + - `GH_PAT` — GitHub personal access token. Make sure that it has `repo` and `write:packages` scopes. Must be in format: `:` 1. Moreover, there are additional prerequisites for the [`capactio/capact`](https://github.com/capactio/capact) repository: @@ -66,7 +66,6 @@ The release of Hub Manifests is automated and done using a GitHub Action workflo 1. Install Capact locally from the version you've just released. 1. Run one of our manifests, such as Mattermost installation. Make sure it passes. -1. Edit the draft release with key highlights and publish it on the [`capact` Releases](https://github.com/capactio/capact/releases) page. ### Release documentation @@ -84,16 +83,18 @@ To read more about documentation versioning, see the [Versioning](https://docusa 1. For the [`capactio/website`](https://github.com/capactio/website) repository: Update announcement bar. 1. Create pull request with announcement banner update (`themeConfig.announcementBar` in the [`docusaurus.config.js`](https://github.com/capactio/website/blob/main/docusaurus.config.js) file). 1. Get review from any code owner and merge it. -1. For the [`capactio/capact`](https://github.com/capactio/capact) repository: Archive images from Helm charts and add to the GitHub release. - 1. Check out the release branch for the release you created. - 1. Make sure you track `upstream` release branch and you are on the latest commit. - 1. Run the following command: - ```bash - CAPACT_VERSION={version} # e.g. 0.5.0 - capact alpha archive-images helm -v --version ${CAPACT_VERSION} -o ./capact-images-amd64.tar.gz --compress gzip - ``` - 1. Once the archive is ready to upload, navigate to the [`capact` Releases](https://github.com/capactio/capact/releases) page and edit your release. - 1. Upload the archive as another attachment to the release and click **Update release** button. +1. For the [`capactio/capact`](https://github.com/capactio/capact) repository: + 1. Archive images from Helm charts and add to the GitHub release. + 1. Check out the release branch for the release you created. + 1. Make sure you track `upstream` release branch and you are on the latest commit. + 1. Run the following command: + ```bash + CAPACT_VERSION={version} # e.g. 0.5.0 + capact alpha archive-images helm -v --version ${CAPACT_VERSION} -o ./capact-images-amd64.tar.gz --compress gzip + ``` + 1. Once the archive is ready to upload, navigate to the [`capact` Releases](https://github.com/capactio/capact/releases) page and edit your release. + 1. Upload the archive as another attachment to the release and click **Update release** button. + 1. On the [`capact` Releases](https://github.com/capactio/capact/releases) page, edit the draft release with key highlights and publish it. 1. Share the news on our Slack and social media. ### Cleanup