Skip to content

Commit 2b73c3c

Browse files
sozercandependabot[bot]JaydipGabaniianstantonritazh
authored
ci: release checklist (#3990)
Signed-off-by: Sertac Ozercan <sozercan@gmail.com> Signed-off-by: Jaydip Gabani <gabanijaydip@gmail.com> Signed-off-by: Ian Stanton <ian@stanton.sh> Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jaydip Gabani <gabanijaydip@gmail.com> Co-authored-by: Ian Stanton <ian@stanton.sh> Co-authored-by: Rita Zhang <rita.z.zhang@gmail.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: JaydipGabani <20255485+JaydipGabani@users.noreply.github.com>
1 parent 896d662 commit 2b73c3c

File tree

2 files changed

+45
-8
lines changed

2 files changed

+45
-8
lines changed

.github/workflows/release-pr.yaml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ name: create_release_pull_request
22
on:
33
push:
44
tags:
5-
- 'v[0-9]+.[0-9]+.0' # run this workflow when a new minor version is published
5+
- "v[0-9]+.[0-9]+.0" # run this workflow when a new minor version is published
66
workflow_dispatch:
77
inputs:
88
release_version:
9-
description: 'Which version are we creating a release pull request for?'
9+
description: "Which version are we creating a release pull request for?"
1010
required: true
1111

1212
permissions:
@@ -98,6 +98,23 @@ jobs:
9898
branch: "release-${{ env.NEWVERSION }}"
9999
base: "${{ env.TARGET_BRANCH }}"
100100
signoff: true
101+
body: |
102+
## Release Preparation Checklist
103+
104+
Before merging this PR, please ensure the following items are completed:
105+
106+
### Pre-Release Dependencies Check
107+
- [ ] **Dependabot PRs**: All open [Dependabot PRs](https://github.com/open-policy-agent/gatekeeper/pulls?q=is%3Apr+author%3Aapp%2Fdependabot) have been reviewed and merged
108+
- [ ] **OPA**: Updated to latest stable version from [OPA releases](https://github.com/open-policy-agent/opa/releases)
109+
- [ ] **cert-controller**: Updated to latest commit from [cert-controller](https://github.com/open-policy-agent/cert-controller/)
110+
- [ ] **Constraint Framework**: Updated to latest commit from [frameworks releases](https://github.com/open-policy-agent/frameworks/)
111+
112+
### Security Check
113+
- [ ] **Trivy Scan**: [Latest vulnerability scan](https://github.com/open-policy-agent/gatekeeper/actions/workflows/scan-vulns.yaml?query=branch%3Amaster) passes with no detected vulnerabilities
114+
115+
---
116+
117+
This PR prepares release ${{ env.NEWVERSION }}. All automated checks must pass before merging.
101118
labels: |
102119
release-pr
103120
${{ github.event.inputs.release_version }}

docs/RELEASE.md

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
The release process consists of three phases: versioning, building, and publishing.
66

77
Versioning involves maintaining the following files:
8+
89
- **Makefile** - the Makefile contains a VERSION variable that defines the version of the project.
910
- **manager.yaml** - the controller-manager deployment yaml contains the latest release tag image of the project.
1011
- **gatekeeper.yaml** - the gatekeeper.yaml contains all gatekeeper resources to be deployed to a cluster including the latest release tag image of the project.
@@ -20,6 +21,7 @@ Publishing involves creating a release tag and creating a new *Release* on GitHu
2021
There is an optional script for cherry-picking PRs that should make the process easier.
2122

2223
Prerequisites:
24+
2325
- `hub` binary is installed. If not, `hub` can be installed by `go get github.com/github/hub`.
2426
- Set GitHub username with `export GITHUB_USER=<your GitHub username>`
2527
- Set fork remote with `export FORK_REMOTE=<your fork remote name, by default it is "origin">`
@@ -64,16 +66,34 @@ Before we cut a release, we need to create a release pull request against the HE
6466

6567
During the workflow, it will create the release manifests, promote the manifests from `manifest_staging/charts` and `manifest_staging/deploy` to `charts` and `deploy` folders respectively, and create the release pull request on behalf of the release author.
6668

69+
## Additional Pre-Release Checklist
70+
71+
Before creating a release pull request, ensure the following steps are completed:
72+
73+
1. **Dependabot PRs**
74+
- Ensure all [Dependabot PRs](https://github.com/open-policy-agent/gatekeeper/pulls?q=is%3Apr+author%3Aapp%2Fdependabot) are reviewed and merged. This keeps dependencies up to date and secure.
75+
76+
2. **Dependency Updates**
77+
- Confirm that the following dependencies are updated to their latest stable versions or commits:
78+
- [OPA](https://github.com/open-policy-agent/opa)
79+
- [cert-controller](https://github.com/open-policy-agent/cert-controller)
80+
- [Constraint Framework](https://github.com/open-policy-agent/frameworks/tree/master/constraint)
81+
- Reference the relevant repositories and check for new releases.
82+
83+
3. **Vulnerability Scanning**
84+
- Ensure [Trivy](https://github.com/aquasecurity/trivy) scans are passing and no vulnerabilities are detected in the latest CI run.
85+
- Review the [latest Trivy scan results](https://github.com/open-policy-agent/gatekeeper/actions/workflows/scan-vulns.yaml?query=branch%3Amaster) before proceeding.
86+
6787
## Building and releasing
6888

6989
1. Once the release pull request is merged to `master` or `release` branch (`<BRANCH NAME>` below), tag that commit with release version and push tags to remote repository.
7090

71-
```
72-
git checkout <BRANCH NAME>
73-
git pull origin <BRANCH NAME>
74-
git tag -a <NEW VERSION> -m '<NEW VERSION>'
75-
git push origin <NEW VERSION>
76-
```
91+
```shell
92+
git checkout <BRANCH NAME>
93+
git pull origin <BRANCH NAME>
94+
git tag -a <NEW VERSION> -m '<NEW VERSION>'
95+
git push origin <NEW VERSION>
96+
```
7797

7898
1. Pushing the release tag will trigger GitHub Actions to trigger `tagged-release` job.
7999
This will build the `openpolicyagent/gatekeeper` image automatically, then publish the new release image tag and the `latest` image tag to the `openpolicyagent/gatekeeper` repository. Finally, verify step will run e2e tests to verify the newly released tag.

0 commit comments

Comments
 (0)