fix(ci): migrate preview deploy to ECR, fix prod image mapping - #1460
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What's this PR does ?
Fixes the preview (develop) deploy pipeline, dead since ~July 9:
gke-dev.ymlstill authenticated as the GCP service accountk8s-671@console-labs-prod, which was deleted (every run fails at auth withinvalid_grant: account not found). Mirrors the ECR/EKS migration already done for prod ingke-prod.yml.Also fixes a latent no-op in
gke-prod.yml: both kustomize overlays inconsolelabs/infrastructurekey theirimages:transform on the legacy GAR name (asia-southeast1-docker.pkg.dev/console-labs-prod/consolelabs/mochi-api, the namedeployment.yamlreferences), but the prod workflow'skustomize edit set imageused the ECR name as the OLD name, so the edit would add an entry matching nothing and the running image would never update. Never caught because prod runs died at auth first (stale 2023 AWS secrets, refreshed today).Changes
gke-dev.yml: GCP auth + GCR push replaced withaws-actions/configure-aws-credentials+ ECR login + push to768727713577.dkr.ecr.ap-southeast-1.amazonaws.com/mochi/api:${GITHUB_SHA}; kustomize edit keys on the legacy GAR name so the preview overlay actually rewrites.gke-prod.yml:kustomize edit set imageold-name corrected to the legacy GAR name (one line + comment).Verification plan
Merging this to develop triggers the new workflow on this very commit, that run IS the live test. Expected: ECR login ok, image pushed,
infrastructure/mochi-api/preview/kustomization.ymlgets a commit flippingnewNameto the ECR path with this SHA asnewTag.Not in scope
GCP_CREDENTIALSsecret (leave until prod path re-verified end-to-end).newTag(232549f, July 9) self-heals on first successful run.