Skip to content

ci: gke-preprod build target with custom banner (TRA-852)#421

Closed
mikestankavich wants to merge 1 commit into
mainfrom
feat/gke-preprod-banner-build
Closed

ci: gke-preprod build target with custom banner (TRA-852)#421
mikestankavich wants to merge 1 commit into
mainfrom
feat/gke-preprod-banner-build

Conversation

@mikestankavich
Copy link
Copy Markdown
Contributor

Summary

Adds a parallel gke-preprod build target so the GKE cutover dry-run cluster (app.prod.gke.trakrf.id, TRA-850 / TRA-351) can run a real backend image with an explicit "GKE pre-prod" banner instead of the generic "Preview" one. Testers can then tell at a glance they're on the GKE dry-run rather than the regular preview composition.

Changes

  • Push trigger now includes gke-preprod in addition to main and preview
  • metadata-action emits a floating :gke-preprod tag, gated on refs/heads/gke-preprod
  • VITE_ENVIRONMENT resolution moved from a nested GH Actions ternary into a shell case. Three branches: refs/tags/v* → empty (no banner), refs/heads/gke-preprod"GKE pre-prod", default → "preview"
  • Drive-by fix: the previous expression ${{ startsWith(github.ref, 'refs/tags/v') && '' || 'preview' }} collapsed to 'preview' always, because '' || 'preview' short-circuits to 'preview' in GH Actions expressions. Fixed in passing; harmless today since v-tags don't trigger this workflow yet, but the v-tag → empty intent is now actually honored

Coordination with trakrf-infra

  • clear-wolf is preparing the helm-side change (per-env imageTag field in argocd/root/values.yaml) — drafted, holds until ghcr.io/trakrf/backend:gke-preprod is queryable
  • After merge: I push gke-preprod from current main → docker-build → image lands on GHCR. Will ping clear-wolf when both happen
  • Post-cutover: delete the gke-preprod branch. The workflow trigger goes dormant, the existing image stays available for rollback

Test plan

  • After merge + branch push: ghcr.io/trakrf/backend:gke-preprod queryable
  • Image pulled and deployed by infra shows banner reading "GKE pre-prod Environment", browser title prefix [GKE]
  • :preview and :latest flow unaffected (existing image-updater track for preview keeps working)

🤖 Generated with Claude Code

Adds a parallel `gke-preprod` build target so the GKE cutover dry-run
cluster can run a real backend image with an explicit "GKE pre-prod"
banner instead of the generic "Preview" one — testers can tell at a
glance they're on the GKE dry-run rather than the preview composition.

Changes:
- Push trigger now includes `gke-preprod` branch
- metadata-action emits floating `:gke-preprod` tag for that ref
- VITE_ENVIRONMENT resolution moved to a shell case (was nested GH
  Actions ternary). New cases: v-tag → empty, gke-preprod → "GKE pre-prod",
  default → "preview". Drive-by fix: the previous `startsWith(...) && '' ||
  'preview'` collapses to 'preview' always — `'' || 'preview'` short-
  circuits in GH expressions

After merge: push `gke-preprod` from main so the image materializes.
Infra (clear-wolf) pins helm to `:gke-preprod`. Delete the branch after
Saturday's cutover; the trigger is harmless without a branch.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

🚀 Preview Deployment Update

✅ This PR has been successfully merged into the preview branch.

The preview environment will update shortly at: https://app.preview.trakrf.id

@mikestankavich
Copy link
Copy Markdown
Contributor Author

Superseded by TRA-853 (runtime-driven environment banner). Per Mike 2026-05-28: banner must be 100% runtime-driven from environment, not build-time baked — which makes a build-time gke-preprod target throwaway. Building the runtime fix instead; the GKE dry-run will set its banner via a pod env var on the same main image. Deleting the branch; no :gke-preprod image will be published.

@mikestankavich mikestankavich deleted the feat/gke-preprod-banner-build branch May 28, 2026 09:52
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.

1 participant