Skip to content

ci: gate reload deploy on GitHub Actions instead of Cloud Build#350

Merged
oioki merged 2 commits into
masterfrom
alextarasov/reload-gocd-gha-checks
Jun 15, 2026
Merged

ci: gate reload deploy on GitHub Actions instead of Cloud Build#350
oioki merged 2 commits into
masterfrom
alextarasov/reload-gocd-gha-checks

Conversation

@oioki

@oioki oioki commented Jun 15, 2026

Copy link
Copy Markdown
Member

Atomic cutover: move the reload image build off Cloud Build onto GitHub Actions.

Cloud Build can't unpack the dhi-mirror (Docker Hardened Image) base layers (archive/tar: invalid tar header). The GHA builder, conversely, can't pull the old sentryio/dhi repo (403). So the base-image switch and the deploy-gate switch are two sides of one change and must land together:

  • Dockerfilesentryio/dhi-mirror bases (supersedes chore: use dhi-mirror as base images #348). Makes the GHA image workflow build successfully.
  • GoCD checks stagechecks-githubactions-checkruns getsentry/reload ${GO_REVISION_RELOAD_REPO} "Build and push production image" (matches the job name: in .github/workflows/image.yml), plus the GITHUB_TOKEN secret env checkruns needs.
  • Remove cloudbuild.yaml — Cloud Build no longer builds this service.
  • Deploy stage unchanged: still deploys us-central1-docker.pkg.dev/sentryio/reload/image:${GO_REVISION_RELOAD_REPO} (full SHA, matching what the action tags).

Verified on #349: on a dhi-mirror commit, the GHA workflow built and pushed …/reload/image:<sha> and …/reload-mr/image:<sha> to both registries via the gha-gcr-push WIF identity (getsentry/security-as-code#3128), while Cloud Build failed on the same commit.

After merge: ask dev-infra to disable the build-reload-image Cloud Build trigger (it will keep firing and failing on dhi-mirror until then, but is no longer in the deploy path).

oioki and others added 2 commits June 16, 2026 00:55
Now that the production image is built and pushed by the image workflow
(.github/workflows/image.yml), switch the GoCD checks stage from
checks-googlecloud-check-cloudbuild to checks-githubactions-checkruns,
waiting on the "Build and push production image" job. Remove
cloudbuild.yaml since Cloud Build no longer builds this service.

The deploy stage is unchanged: the image is still tagged with the full
commit SHA at us-central1-docker.pkg.dev/sentryio/reload/image.

Merge this only after the image workflow has been verified pushing
images on master. After it lands, the Cloud Build trigger
(build-reload-image) can be disabled.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The GitHub Actions builder cannot pull from sentryio/dhi (403 anonymous
token); only the sentryio/dhi-mirror repo is readable. Switching the base
images to dhi-mirror is what makes the GHA build succeed, so it lands
atomically with the GoCD gate flip in this PR: once merged, the image
workflow builds dhi-mirror (green) and GoCD gates on that run, while
Cloud Build — which fails on dhi-mirror with "invalid tar header" — is no
longer in the deploy path.

Supersedes #348.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@oioki
oioki force-pushed the alextarasov/reload-gocd-gha-checks branch from 3c72db3 to 9725e09 Compare June 15, 2026 22:56
@oioki
oioki marked this pull request as ready for review June 15, 2026 22:56
@oioki oioki mentioned this pull request Jun 15, 2026
4 tasks
@oioki
oioki requested review from a team and joshuarli June 15, 2026 23:00
@oioki
oioki merged commit 7f5ef45 into master Jun 15, 2026
17 of 18 checks passed
@oioki
oioki deleted the alextarasov/reload-gocd-gha-checks branch June 15, 2026 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants