-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Release process enhancement #1185
Open
didierofrivia
wants to merge
39
commits into
main
Choose a base branch
from
release-process-enhancement
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 33 commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
dfd3b7e
UPDATE: Release Document
Boomatang 8357a84
UPDATE: Release Process
Boomatang 985d410
UPDATE: Release doc
Boomatang 5e0750b
UPDATE: RELEASE SCRIPT
Boomatang e49d63d
UPDATE: Release.toml format
Boomatang 6c739a2
UPDATE: release workflow
Boomatang 1beee7a
ADD: verify-prepare-release
Boomatang b0a573a
UPDATE: Format release.toml
Boomatang 2f74839
[ci] Automated release operator workflow
didierofrivia e35af00
[docs] Updating RELEASE.md including automated release
didierofrivia f15705f
[ci] Setting upstream origin for new release base branch
didierofrivia 87afd8f
[ci] Changed GH token
didierofrivia 05147ad
UPDATE: GitHub workflows
Boomatang 7f7e8a5
UPDATE: Latest tag
Boomatang fc73c9b
[refactor] DRYing release script
didierofrivia 24f3786
[script] Checking if operator tag is already released
didierofrivia 9c7a3c8
[script] `post-validation` phase removed from main execution
didierofrivia 04a4a4a
[refactor] Renaming verify tag script
didierofrivia 6d806cd
[refactor] Using authenticated request and json verification
didierofrivia e6a11f6
[ci] Verifying if dependencies have been already released
didierofrivia 2ae0a67
[ci] Calling `make prepare-release` with a GITHUB_TOKEN
didierofrivia facf451
[docs] Updated release docs mentioning rate limiting and GITHUB_TOKEN
didierofrivia 44c15f3
[script] Conditionally adding auth header
didierofrivia 763f29b
[script] Adding semver validation and `0.0.0` check
didierofrivia 9241456
[ci] Fix create release by creating tag before
didierofrivia ca5ffa6
FIX: Workflow steps
Boomatang d985f86
FIX: commitish-taraget
Boomatang 423518a
[ci] Adding workflow_dispatch event trigger
didierofrivia acdce88
[ci] Checkout code with kuadrant PAT
didierofrivia 140b5ce
[make] Restore original verification targets
didierofrivia 9ce6e67
[ci] Conditionally triggering verification of release manifests
didierofrivia 84f35fc
Makefile: Release section
eguzki ad59558
Merge pull request #1216 from Kuadrant/improve-makefile
eguzki 04e933f
UPDATE: Release Doc
Boomatang e44d899
prepare-release: make default-channel optional
eguzki 9067fca
release: post-validation of the OLM default channel
eguzki f514fec
Merge pull request #1217 from Kuadrant/make-default-channel-optional
eguzki 2c633ac
workflows/build-images-for-tag-release.yaml: fix operator image build
eguzki 521e80e
Merge pull request #1223 from Kuadrant/fix-build-images-workflow
eguzki File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
name: Automated Release Operator | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
gitRef: | ||
description: Commit SHA, tag or branch name (usually main branch) | ||
required: true | ||
default: "main" | ||
type: string | ||
kuadrantOperatorVersion: | ||
description: Kuadrant Operator version (semver) | ||
default: 0.0.0 | ||
type: string | ||
authorinoOperatorVersion: | ||
description: Authorino Operator bundle version (semver) | ||
default: 0.0.0 | ||
type: string | ||
limitadorOperatorVersion: | ||
description: Limitador Operator bundle version (semver) | ||
default: 0.0.0 | ||
type: string | ||
dnsOperatorVersion: | ||
description: DNS Operator bundle version (semver) | ||
default: 0.0.0 | ||
type: string | ||
wasmShimVersion: | ||
description: WASM Shim version (semver) | ||
default: 0.0.0 | ||
type: string | ||
consolePluginVersion: | ||
description: ConsolePlugin version (semver) | ||
default: 0.0.0 | ||
type: string | ||
olmChannel: | ||
description: OLM channel | ||
required: false | ||
type: string | ||
default: "stable" | ||
|
||
jobs: | ||
auto-release: | ||
name: Release operator | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Go 1.22.x | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: 1.22.x | ||
id: go | ||
- name: Checkout code at git ref | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.inputs.gitRef }} | ||
token: ${{ secrets.KUADRANT_WORKFLOWS_PAT }} | ||
|
||
- name: Install gettext-base | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y gettext-base | ||
|
||
- name: Install yq tool | ||
run: | | ||
make yq | ||
|
||
- name: Create release branch(es) | ||
id: create-release-branch | ||
shell: bash | ||
run: | | ||
base_branch=release-v$(echo "${{ github.event.inputs.kuadrantOperatorVersion }}" | sed 's/[+-].*//; s/\.[0-9]*$//') | ||
echo BASE_BRANCH=$base_branch >> $GITHUB_ENV | ||
|
||
if git ls-remote --exit-code --heads origin $base_branch ; then | ||
echo "Base branch $base_branch already exists" | ||
else | ||
echo Creating branch "$base_branch" | ||
git checkout -b "$base_branch" | ||
git push --set-upstream origin "$base_branch" | ||
fi | ||
|
||
- name: Prepare release | ||
id: prepare-release | ||
run: | | ||
echo "Updating release.yaml with desired versions" | ||
|
||
VERSION=${{ github.event.inputs.kuadrantOperatorVersion }} \ | ||
AUTHORINO_OPERATOR_VERSION=${{ github.event.inputs.authorinoOperatorVersion }} \ | ||
DNS_OPERATOR_VERSION=${{ github.event.inputs.dnsOperatorVersion }} \ | ||
LIMITADOR_OPERATOR_VERSION=${{ github.event.inputs.limitadorOperatorVersion }} \ | ||
CONSOLE_PLUGIN_VERSION=${{ github.event.inputs.consolePluginVersion }} \ | ||
WASM_SHIM_VERSION=${{ github.event.inputs.wasmShimVersion }} \ | ||
OLM_CHANNEL=${{ github.event.inputs.olmChannel }} \ | ||
yq eval '(.kuadrant-operator.version = strenv(VERSION)) | | ||
(.dependencies.authorino-operator = strenv(AUTHORINO_OPERATOR_VERSION)) | | ||
(.dependencies.dns-operator = strenv(DNS_OPERATOR_VERSION)) | | ||
(.dependencies.limitador-operator = strenv(LIMITADOR_OPERATOR_VERSION)) | | ||
(.dependencies.console-plugin = strenv(CONSOLE_PLUGIN_VERSION)) | | ||
(.dependencies.wasm-shim = strenv(WASM_SHIM_VERSION)) | | ||
(.olm.default-channel = strenv(OLM_CHANNEL)) | | ||
(.olm.channels[0] = strenv(OLM_CHANNEL))' --inplace ./release.yaml | ||
|
||
echo "release.yaml file updated as follows:" | ||
|
||
cat ./release.yaml | ||
|
||
echo "Running prepare-release script" | ||
|
||
GITHUB_TOKEN=${{ secrets.KUADRANT_WORKFLOWS_PAT }} make prepare-release | ||
|
||
- name: Create Pull Request | ||
id: cpr | ||
if: ${{ !env.ACT }} | ||
uses: peter-evans/create-pull-request@v7 | ||
with: | ||
token: ${{ secrets.KUADRANT_DEV_PAT }} | ||
commit-message: Prepare release ${{ github.event.inputs.kuadrantOperatorVersion }} | ||
committer: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | ||
author: ${{ github.actor }} <${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com> | ||
signoff: true | ||
base: ${{ env.BASE_BRANCH }} | ||
branch: release-v${{ github.event.inputs.kuadrantOperatorVersion }} | ||
delete-branch: true | ||
title: '[Release] Kuadrant Operator v${{ github.event.inputs.kuadrantOperatorVersion }}' | ||
body: | | ||
The following PR for the release candidate of Kuadrant Operator version ${{ github.event.inputs.kuadrantOperatorVersion }} includes: | ||
- Authorino Operator version ${{ github.event.inputs.authorinoOperatorVersion }} | ||
- DNS Operator version ${{ github.event.inputs.dnsOperatorVersion }} | ||
- Limitador Operator version ${{ github.event.inputs.limitadorOperatorVersion }} | ||
- Console Plugin version ${{ github.event.inputs.consolePluginVersion }} | ||
- WASM Shim version ${{ github.event.inputs.wasmShimVersion }} | ||
|
||
Auto-generated by [create-pull-request][1] | ||
|
||
[1]: https://github.com/peter-evans/create-pull-request | ||
team-reviewers: | | ||
Kuadrant/developers | ||
Kuadrant/qe | ||
draft: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
name: Build and Publish Images For Tag Release | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
tags: | ||
- "v[0-9]+.[0-9]+.[0-9]+-?**" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Release Operator | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- closed | ||
branches: | ||
- 'release-v[0-9]+.[0-9]+' | ||
workflow_dispatch: {} | ||
|
||
jobs: | ||
release-operator: | ||
if: github.event.pull_request.merged == true | ||
name: Release operator | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code at git ref | ||
uses: actions/checkout@v4 | ||
with: | ||
token: '${{ secrets.KUADRANT_DEV_PAT }}' | ||
- name: Set environment variables | ||
id: set_env_variables | ||
run: | | ||
bash ./utils/release/load_github_envvar.sh | ||
- name: Create tag | ||
id: create_tag | ||
run: | | ||
tag_name="${{ env.kuadratantOperatorTag }}" | ||
git tag $tag_name | ||
git push origin $tag_name | ||
- name: Create release | ||
id: create_release | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
name: ${{ env.kuadratantOperatorTag }} | ||
tag_name: ${{ env.kuadratantOperatorTag }} | ||
body: "${{ env.releaseBody }}" | ||
generate_release_notes: true | ||
target_commitish: ${{ env.releaseBranch }} | ||
prerelease: ${{ env.prerelease }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is better to have N verify jobs. Two reasons:
make bundle
could be changing files from helm charts and the helm charts test could be failing due to bundle test. Test isolation is always a desired property.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure I fully agree with the each test running in isolation. There is a strong interaction between the bundles and helm charts when it comes to releasing. Would see this test more of an integration test over a unit test. When the
make prepare-release
would resolve both issue I don't see the need to have them split.You might know very quickly what failed, but does that tell you as quickly how to fix it. I also think the make target in the test should not be used, but instead use
make verify-prepare-release
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The source of truth is in golang code and
/config
plus few other places like Makefile. Those are verification steps to make sure the source of truth is consistent with the shipped manifests (bundle or helm charts). So, IMO, independent and isolated tests are good to have. I can live without it as well.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the future, the Makefile will no longer be a source of truth.. it will be replaced by release.yaml. Because now there are two ways to generate the manifests and eventually we need to merge into one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed eventually it needs to merge into one. The next step on the road I see is how the nightly test pipeline generate their builds.