Updates the build scripts to allow for a patch release#4291
Updates the build scripts to allow for a patch release#4291igooch merged 4 commits intoagones-dev:mainfrom
Conversation
|
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. |
gongmax
left a comment
There was a problem hiding this comment.
LGTM, thanks for the comprehensive tests
|
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: |
> 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.
|
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: |
Makes updates so that the release-branch creation happens before the rest of the release process.
|
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: |
* 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.
* 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.
* 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>
* 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.
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 testsuite.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.