Skip to content

Fixes post_cloudbuild release by explicitly passing variables as Makefile arguments#4423

Merged
igooch merged 1 commit intoagones-dev:mainfrom
igooch:cloudbuild-fix
Jan 14, 2026
Merged

Fixes post_cloudbuild release by explicitly passing variables as Makefile arguments#4423
igooch merged 1 commit intoagones-dev:mainfrom
igooch:cloudbuild-fix

Conversation

@igooch
Copy link
Copy Markdown
Collaborator

@igooch igooch commented Jan 14, 2026

What type of PR is this?

/kind bug

What this PR does / Why we need it:

This PR updates the post_cloudbuild.yaml script to ensure that release build and push uses the correct version string and skips the development suffix.

Specifically, it changes how VERSION and FULL_BUILD are passed to the make-docker steps. By moving these from environment variables to explicit command-line arguments, we force the Makefile to use the provided release version (e.g., 1.55.0).

Previously, the Makefile was defaulting to a development version string (e.g., 1.55.0-dev-1b1c538) during the push-images step. The Cloud Build would fail, because the push-images step looked for development tags that did not match the release image tags correctly created in the previous build step.

Cloud Build push-images log:

Step #5 - "push-images": docker buildx use arm64-builder || docker buildx create --name arm64-builder --use
Step #5 - "push-images": docker buildx build --platform linux/arm64 --builder arm64-builder --build-arg ARCH=arm64 /workspace/cmd/controller/ --tag=us-docker.pkg.dev/agones-images/release/agones-controller:1.55.0-dev-1b1c538-arm64 --push
...
Step #5 - "push-images": docker buildx imagetools create --tag us-docker.pkg.dev/agones-images/release/agones-controller:1.55.0 us-docker.pkg.dev/agones-images/release/agones-controller:1.55.0-amd64 us-docker.pkg.dev/agones-images/release/agones-controller:1.55.0-arm64
Step #5 - "push-images": ERROR: us-docker.pkg.dev/agones-images/release/agones-controller:1.55.0-arm64: not found

Which issue(s) this PR fixes:

NA

Special notes for your reviewer:

Even though the push-images step was the failing step, I updated for all build-images, push-images, and push-chart steps for consistency.

@github-actions github-actions bot added the kind/bug These are bugs. label Jan 14, 2026
@igooch igooch requested a review from vicentefb January 14, 2026 19:29
@igooch igooch requested a review from peterzhongyi January 14, 2026 19:29
@agones-bot
Copy link
Copy Markdown
Collaborator

Build Succeeded 🥳

Build Id: 4d253e91-0154-4a1f-a2b0-deb0bcb53b1b

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/4423/head:pr_4423 && git checkout pr_4423
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.56.0-dev-e2d1229

env: ['VERSION=${_VERSION}', DOCKER_RUN_ARGS=--network=cloudbuild]
env:
- VERSION=${_VERSION}
- DOCKER_RUN_ARGS=--network=cloudbuild
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

just curious what's the other --network= option besides cloudbuild ?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The flag is a bit confusing as it's not changing the network, it's exposing the application default credentials in the cloudbuild network to a nested docker container. https://docs.cloud.google.com/build/docs/build-config-file-schema#network

Copy link
Copy Markdown
Collaborator

@vicentefb vicentefb left a comment

Choose a reason for hiding this comment

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

lgtm

@igooch igooch merged commit deb0b4e into agones-dev:main Jan 14, 2026
5 checks passed
@igooch igooch deleted the cloudbuild-fix branch January 14, 2026 22:49
mnthe pushed a commit to mnthe/agones that referenced this pull request Mar 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug These are bugs. size/S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants