feat(kargo): Accounts sign-in freight-verification AnalysisTemplate (tb-dev) [DRAFT] - #41
feat(kargo): Accounts sign-in freight-verification AnalysisTemplate (tb-dev) [DRAFT]#41aatchison wants to merge 2 commits into
Conversation
…on (tb-dev) Add a Kargo freight-verification AnalysisTemplate that runs the @deployment-analysis Playwright sign-in E2E (thunderbird-accounts#1146 / #1137) against the promoted tb-dev deployment, plus the ExternalSecret for the test-user creds and a README. ACCTS_TARGET_ENV is set to "dev" so the suite exercises OIDC sign-in (the test's beforeEach) but skips the subscription-detail dashboard assertions the tb-dev test user can't satisfy (no Pro subscription; subscribe isn't automated on dev). Any other value hard-fails, since navigateToDashboard() requires /dashboard and a subscription-less user is redirected to /subscribe. Draft: REPLACE_KARGO_PROJECT_NS (Kargo Project ns) and REPLACE_E2E_IMAGE (CI-built Playwright image) are filled once the sibling Kargo Project/Warehouse/Stage spec and the E2E image exist. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…fill tb-accounts ns Upstream deployment-analysis E2E (thunderbird-accounts#1146) is merged and runs Playwright directly on a runner (no published E2E image exists). Rework the AnalysisTemplate to match: a stock mcr.microsoft.com/playwright:v1.59.1-noble image (tag pinned to the repo's @playwright/test) checks out test/e2e at run time (git clone -> npm ci -> npx playwright install firefox -> npm run deployment-analysis-e2e). Public repo, so no clone creds; ACCTS_E2E_REF selects the ref. - Fill the now-known Kargo Project namespace (tb-accounts) across all three manifests. - Drop the REPLACE_E2E_IMAGE sentinel (no bespoke image needed). - Note approach (c) — Kargo triggering the GH Actions workflow — as a documented follow-up in the template + README. Manifests pass kubectl apply --dry-run=server against tb-accounts. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Verified against merged upstream + reworked to approach (b)Now that thunderbird-accounts#1146 is merged, I verified this against reality:
Key finding that changed the design: there is no published E2E image — upstream runs Playwright directly on a GitHub runner ( Approach (c) noted for later (in the template + README): have Kargo trigger the existing GH Actions E2E workflow via a Still needed before it can run live (kept as a draft):
|
What
A Kargo
AnalysisTemplate(accounts-signin-e2e) that runs the new@deployment-analysisPlaywright sign-in E2E from thunderbird-accounts#1146 (npm run deployment-analysis-e2e) as freight verification on tb-dev — plus theExternalSecretfor the test-user creds and akargo/README.md.Wires into the Accounts Kargo Stage as:
The env var (the point of this PR)
ACCTS_TARGET_ENV=devis set deliberately. On dev the test user has no Pro subscription (subscribe isn't automated yet), so the suite'sdevguard skips the subscription-detail dashboard assertions while still exercising OIDC sign-in via the test'sbeforeEach. With any other value the test hard-fails:navigateToDashboard()polls for/dashboard, but a subscription-less user is redirected to/subscribe.ACCTS_HUB_URLis the public host (accounts.tb-dev.thunderbird.dev) because sign-in bounces through the public Keycloak.Before deploy-ready (why it's a draft)
REPLACE_KARGO_PROJECT_NS— the Accounts Kargo Project namespace (from the sibling Project/Warehouse/Stage spec, not yet in this repo).REPLACE_E2E_IMAGE— a Playwright image bundlingtest/e2e+ browsers + thedeployment-analysis-e2escript, built by Accounts CI (thunderbird-accounts#1137).mzla/tb-dev/accounts-e2e(ACCTS_OIDC_EMAIL+ACCTS_OIDC_PWORD) and ensure the Kargo cluster has theaws-secrets-managerClusterSecretStore + IRSA read access.kubectl kustomize kargo/tb-devrenders both manifests cleanly.