Skip to content

Updates the build scripts to allow for a patch release#4291

Merged
igooch merged 4 commits intoagones-dev:mainfrom
igooch:patch-release-fixes
Oct 1, 2025
Merged

Updates the build scripts to allow for a patch release#4291
igooch merged 4 commits intoagones-dev:mainfrom
igooch:patch-release-fixes

Conversation

@igooch
Copy link
Copy Markdown
Collaborator

@igooch igooch commented Sep 30, 2025

What type of PR is this?

/kind cleanup
/kind hotfix

What this PR does / Why we need it:

The recent attempt to create the 1.52.1 patch release revealed several critical flaws in the release automation tooling. The release process was hard coded for in several places for minor releases only, and failed when run against a release branch for a patch.

This PR overhauls the release scripts to make them usable for both minor and patch releases.

The pre_cloudbuild.yaml and post_cloudbuild.yaml files are no longer hardcoded to the main branch. They now accept a _BRANCH_NAME substitution, allowing them to clone and build from the correct release branch. This modification means that the release branch will need to be created before either of these steps are run for both minor and patch releases.

The build/scripts/previousversion/main.go script can now determine the previous version for both minor and patch releases by inspecting the version number, removing the need for a -release-stage flag. To find the previous release version, it now queries GCS bucket with the agones-charts to find the latest patch of the previous minor series.

The build/scripts/sdk-update-version/main.go and build/scripts/site-config-update-version/main.go scripts have been updated to correctly handle a patch release stage, so that versions are incremented correctly for patch releases across all SDKs and the website configuration.

This PR also adds unit tests for the build scripts, including previousversion, sdk-update-version, and site-config-update-version. The tests will run as part of the CI / CD pipeline as part of the make test suite.

Makefile Updates: The corresponding Makefile targets (release-deploy-site, tag-deprecated-images, etc.) have been updated to use the new, more robust scripts and logic.

Which issue(s) this PR fixes:

Closes #4284

Special notes for your reviewer:

While there are unit tests, we did not perform testing of any of the parts of the below scripts that actually modify real resources such as the make tag-deprecated-images.

@igooch igooch requested a review from gongmax September 30, 2025 03:03
@github-actions github-actions bot added kind/cleanup Refactoring code, fixing up documentation, etc size/L labels Sep 30, 2025
@agones-bot
Copy link
Copy Markdown
Collaborator

Build Failed 😭

Build Id: 46a9c675-e045-4ccb-8f46-02e46ab9ac49

Status: FAILURE

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

Copy link
Copy Markdown
Collaborator

@gongmax gongmax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for the comprehensive tests

@agones-bot
Copy link
Copy Markdown
Collaborator

Build Succeeded 🥳

Build Id: f2e5973c-64cd-426e-a0cd-c128fb69c109

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

git fetch https://github.com/googleforgames/agones.git pull/4291/head:pr_4291 && git checkout pr_4291
helm install agones ./install/helm/agones --namespace agones-system --set agones.image.registry=us-docker.pkg.dev/agones-images/ci --set agones.image.tag=1.53.0-dev-a901f8f

> The cache key is generated based on a checksum of the dependency manifest files.
> The CI process for the main branch is what populates this cache. If the manifests
> are the same this would pull caches that are based off the main branch instead of
> the release branch.
>
> Removing the cache prioritizes a clean build over speed.
@agones-bot
Copy link
Copy Markdown
Collaborator

Build Succeeded 🥳

Build Id: e41aa21f-79c2-4574-ba72-5d3f32f414db

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

git fetch https://github.com/googleforgames/agones.git pull/4291/head:pr_4291 && git checkout pr_4291
helm install agones ./install/helm/agones --namespace agones-system --set agones.image.registry=us-docker.pkg.dev/agones-images/ci --set agones.image.tag=1.53.0-dev-e0ca609

Makes updates so that the release-branch creation happens before the rest of the release process.
@agones-bot
Copy link
Copy Markdown
Collaborator

Build Succeeded 🥳

Build Id: a60518ef-0106-4767-b382-af78a6b56926

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

git fetch https://github.com/googleforgames/agones.git pull/4291/head:pr_4291 && git checkout pr_4291
helm install agones ./install/helm/agones --namespace agones-system --set agones.image.registry=us-docker.pkg.dev/agones-images/ci --set agones.image.tag=1.53.0-dev-3df4e7b

@igooch igooch merged commit 641286c into agones-dev:main Oct 1, 2025
4 checks passed
Sivasankaran25 pushed a commit to Sivasankaran25/agones that referenced this pull request Oct 1, 2025
* Updates the build scripts to allow for a patch release

* Linter fixes

* Removes restore cache from the post_cloudbuild >
> The cache key is generated based on a checksum of the dependency manifest files.
> The CI process for the main branch is what populates this cache. If the manifests
> are the same this would pull caches that are based off the main branch instead of
> the release branch.
>
> Removing the cache prioritizes a clean build over speed.

* Separates out the release-branch creation for minor and patch
Makes updates so that the release-branch creation happens before the rest of the release process.
Sivasankaran25 pushed a commit to Sivasankaran25/agones that referenced this pull request Oct 1, 2025
* Updates the build scripts to allow for a patch release

* Linter fixes

* Removes restore cache from the post_cloudbuild >
> The cache key is generated based on a checksum of the dependency manifest files.
> The CI process for the main branch is what populates this cache. If the manifests
> are the same this would pull caches that are based off the main branch instead of
> the release branch.
>
> Removing the cache prioritizes a clean build over speed.

* Separates out the release-branch creation for minor and patch
Makes updates so that the release-branch creation happens before the rest of the release process.
gongmax pushed a commit that referenced this pull request Oct 1, 2025
* Updates the build scripts to allow for a patch release

* Linter fixes

* Removes restore cache from the post_cloudbuild >
> The cache key is generated based on a checksum of the dependency manifest files.
> The CI process for the main branch is what populates this cache. If the manifests
> are the same this would pull caches that are based off the main branch instead of
> the release branch.
>
> Removing the cache prioritizes a clean build over speed.

* Separates out the release-branch creation for minor and patch
Makes updates so that the release-branch creation happens before the rest of the release process.

Co-authored-by: igooch <igooch@google.com>
mnthe pushed a commit to mnthe/agones that referenced this pull request Mar 23, 2026
* Updates the build scripts to allow for a patch release

* Linter fixes

* Removes restore cache from the post_cloudbuild >
> The cache key is generated based on a checksum of the dependency manifest files.
> The CI process for the main branch is what populates this cache. If the manifests
> are the same this would pull caches that are based off the main branch instead of
> the release branch.
>
> Removing the cache prioritizes a clean build over speed.

* Separates out the release-branch creation for minor and patch
Makes updates so that the release-branch creation happens before the rest of the release process.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/cleanup Refactoring code, fixing up documentation, etc size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Patch Release 1.52.1

3 participants