constellation/.github/docs/release.md

110 lines
6.8 KiB
Markdown
Raw Normal View History

# Release Checklist
This checklist will prepare `v1.3.0` from `v1.2.0`. Adjust your version numbers accordingly.
1. Merge ready PRs
2022-11-08 17:06:29 -05:00
2. Search the code for TODOs and FIXMEs that should be resolved before releasing.
3. Create docs release (new major or minor release)
2022-09-09 02:04:34 -04:00
```sh
cd docs
2022-10-10 06:05:48 -04:00
npm install
2022-09-09 02:04:34 -04:00
npm run docusaurus docs:version 1.3
# push upstream via PR
```
2022-11-08 17:06:29 -05:00
4. Create a new branch `release/v1.3` (new minor version) or use the existing one (new patch version)
5. On this branch, prepare the following things:
2022-09-01 08:19:57 -04:00
1. (new patch version) `cherry-pick` (only) the required commits from `main`
2. Use [Build micro-service manual](https://github.com/edgelesssys/constellation/actions/workflows/build-micro-service-manual.yml) and run the pipeline once for each micro-service with the following parameters:
* branch: `release/v1.3`
* Container image tag: `v1.3.0`
* Version of the image to build: `1.3.0`
2022-10-10 06:05:48 -04:00
```sh
ver=1.3.0
```
```sh
2022-10-10 06:05:48 -04:00
minor=$(echo $ver | cut -d '.' -f 1,2)
gcpVer=$(echo $ver | tr "." "-")
echo $minor # should be 1.3
echo $gcpVer # should be 1-3-0
```
```sh
gh workflow run build-micro-service-manual.yml --ref release/v$minor -F microService=join-service -F imageTag=v$ver -F version=$ver --repo edgelesssys/constellation
gh workflow run build-micro-service-manual.yml --ref release/v$minor -F microService=kmsserver -F imageTag=v$ver -F version=$ver --repo edgelesssys/constellation
gh workflow run build-micro-service-manual.yml --ref release/v$minor -F microService=verification-service -F imageTag=v$ver -F version=$ver --repo edgelesssys/constellation
```
2022-09-01 08:19:57 -04:00
3. Use [Build operator manual](https://github.com/edgelesssys/constellation/actions/workflows/build-operator-manual.yml) and run the pipeline once with the following parameters:
* branch: `release/v1.3`
2022-08-19 09:29:19 -04:00
* Container image tag: `v1.3.0`
```sh
# Alternative from CLI
2022-10-10 06:05:48 -04:00
gh workflow run build-operator-manual.yml --ref release/v$minor -F imageTag=v$ver --repo edgelesssys/constellation
```
4. Review and update changelog with all changes since last release. [GitHub's diff view](https://github.com/edgelesssys/constellation/compare/v2.0.0...main) helps a lot!
2022-09-20 05:57:52 -04:00
1. Rename the "Unreleased" heading to "[v1.3.0] - YYYY-MM-DD" and link the version to the upcoming release tag.
2. Create a new block for unreleased changes
5. Update project version in [CMakeLists.txt](/CMakeLists.txt) to `1.3.0` (without v).
6. Update the `version` key in [constellation-services/Chart.yaml](/cli/internal/helm/charts/edgeless/constellation-services/Chart.yaml). Also update the `version` key for all subcharts, e.g. [Chart.yaml](/cli/internal/helm/charts/edgeless/constellation-services/charts/kms/Chart.yaml). Lastly, update the `dependencies.*.version` key for all dependencies in the main chart [constellation-services/Chart.yaml](/cli/internal/helm/charts/edgeless/constellation-services/Chart.yaml).
7. When the microservice builds are finished update versions in [versions.go](../../internal/versions/versions.go#L33-L39) to `v1.3.0`, **add the container hashes** and **push your changes**.
8. Create a [production coreOS image](/.github/workflows/build-coreos.yml)
```sh
gh workflow run build-os-image.yml --ref release/v$minor -F debug=false -F imageVersion=v$ver
```
9. Update [default images in config](/internal/config/images_enterprise.go)
10. Run manual E2E tests using [Linux](/.github/workflows/e2e-test-manual.yml) and [macOS](/.github/workflows/e2e-test-manual-macos.yml) to confirm functionality and stability.
2022-09-01 08:19:57 -04:00
```sh
gh workflow run e2e-test-manual.yml --ref release/v$minor -F cloudProvider=azure -F machineType=Standard_DC4as_v5 -F test="sonobuoy full" -F osImage=/CommunityGalleries/ConstellationCVM-b3782fa0-0df7-4f2f-963e-fc7fc42663df/Images/constellation/Versions/$ver -F isDebugImage=false
gh workflow run e2e-test-manual-macos.yml --ref release/v$minor -F cloudProvider=azure -F machineType=Standard_DC4as_v5 -F test="sonobuoy full" -F osImage=/CommunityGalleries/ConstellationCVM-b3782fa0-0df7-4f2f-963e-fc7fc42663df/Images/constellation/Versions/$ver -F isDebugImage=false
gh workflow run e2e-test-manual.yml --ref release/v$minor -F cloudProvider=gcp -F machineType=n2d-standard-4 -F test="sonobuoy full" -F osImage=projects/constellation-images/global/images/constellation-v$gcpVer -F isDebugImage=false
gh workflow run e2e-test-manual-macos.yml --ref release/v$minor -F cloudProvider=gcp -F machineType=n2d-standard-4 -F test="sonobuoy full" -F osImage=projects/constellation-images/global/images/constellation-v$gcpVer -F isDebugImage=false
2022-09-01 08:19:57 -04:00
```
11. [Generate measurements](/.github/workflows/generate-measurements.yml) for the images on each CSP.
```sh
gh workflow run generate-measurements.yml --ref release/v$minor -F cloudProvider=azure -F osImage=/CommunityGalleries/ConstellationCVM-b3782fa0-0df7-4f2f-963e-fc7fc42663df/Images/constellation/Versions/$ver -F isDebugImage=false
gh workflow run generate-measurements.yml --ref release/v$minor -F cloudProvider=gcp -F osImage=projects/constellation-images/global/images/constellation-v$gcpVer -F isDebugImage=false
```
12. Create a new tag on this release branch
2022-10-10 06:05:48 -04:00
```sh
git tag v$ver
git tags --push
```
2022-09-01 08:19:57 -04:00
* Run [Release CLI](https://github.com/edgelesssys/constellation/actions/workflows/release-cli.yml) action on the tag
2022-09-01 08:19:57 -04:00
```sh
2022-10-10 06:05:48 -04:00
gh workflow run release-cli.yml --ref v$ver
2022-09-01 08:19:57 -04:00
```
2022-09-01 08:19:57 -04:00
* The previous step will create a draft release. Check build output for link to draft release. Review & approve.
2022-11-08 17:06:29 -05:00
6. Follow [export flow (INTERNAL)](https://github.com/edgelesssys/wiki/blob/master/documentation/constellation/customer-onboarding.md#manual-export-and-import) to make image available in S3 for trusted launch users.
7. To bring updated version numbers and other changes (if any) to main, create a new branch `feat/release` from `release/v1.3`, rebase it onto main, and create a PR to main
8. Milestones management
2022-09-20 05:57:52 -04:00
1. Create a new milestone for the next release
2. Add the next release manager and an approximate release date to the milestone description
3. Close the milestone for the release
4. Move open issues and PRs from closed milestone to next milestone
2022-11-08 17:06:29 -05:00
9. If the release is a minor version release, create an empty commit on main and tag it as the start of the next pre-release phase.
```sh
2022-10-10 06:05:48 -04:00
nextMinorVer=$(echo $ver | awk -F. -v OFS=. '{$2 += 1 ; print}')
git checkout main
git pull
2022-10-10 06:05:48 -04:00
git commit --allow-empty -m "Start v$nextMinorVer-pre"
git tag v$nextMinorVer-pre
git push origin main v$nextMinorVer-pre
```