Skip to content

ci: parameterized Pulumi deploy from stack-map (#682)#725

Merged
gankoji merged 2 commits intomainfrom
cursor/ci-parameterized-pulumi-deploy-682-3e0a
Apr 12, 2026
Merged

ci: parameterized Pulumi deploy from stack-map (#682)#725
gankoji merged 2 commits intomainfrom
cursor/ci-parameterized-pulumi-deploy-682-3e0a

Conversation

@gankoji
Copy link
Copy Markdown
Member

@gankoji gankoji commented Apr 12, 2026

Summary

Implements issue #682: CD deploy / promote / prod flows are thin wrappers around a reusable workflow that builds a sequential Pulumi matrix from infra/ci/stack-map.yaml via scripts/ci/read-stack-map.mjs (Node + existing yaml dependency from npm ci).

What changed

  • scripts/ci/read-stack-map.mjs — emits matrix_json for dev_cd_full, staging_up (+ optional promote row), prod_cd, and dev_preview_all.
  • .github/workflows/_reusable-pulumi-deploy.ymlworkflow_call with deploy_profile, git_sha, lane/target inputs; dev_prepare for BOM + pulumi-set-dev-image-tag.sh; matrix_prepare runs npm ci then the script; deploy job uses max-parallel: 1 + fail-fast: true for ordering.
  • Thin wrapperscd-deploy-dev.yml, cd-promote-dev-to-staging.yml, cd-deploy-prod.yml now uses the reusable workflow with secrets: inherit.
  • infra/ci/stack-map.yamldev.deploy_order aligned with current dev CD (layer_1/layer_2 stack names + platform dev).
  • PR integrationci-stack-map-pulumi-preview.yml runs preview_all / target: dev when infra/ci/** or the reusable workflow / script changes.
  • infra/ci/README.md — table of wrappers → core + input glossary + secrets pattern note.

Parity / review notes

  • Prod: prod_confirm typo guard moved into reusable matrix_prepare so one production environment gate (no separate validate job).
  • Staging promote: optional first matrix row runs promote-images.sh when staging_include_promote_step: true (single staging environment context for tag + Pulumi).
  • Secrets: Reusable jobs set environment (development / staging / production / preview); callers do not set environment (avoids duplicate approval gates; secrets: inherit still passes through per GitHub’s reusable-workflow behavior).

Proof run locally

  • node scripts/ci/read-stack-map.mjs emit --plan dev_cd_full --platform-stack dev
  • node scripts/ci/read-stack-map.mjs emit --plan prod_cd
  • npm ci --ignore-scripts (validates lockfile + yaml resolution for CI step)

Follow-ups (out of scope here)

Commit: ba4a6774 on cursor/ci-parameterized-pulumi-deploy-682-3e0a.

Open in Web Open in Cursor 

)

- Add scripts/ci/read-stack-map.mjs to emit sequential deploy matrices from infra/ci/stack-map.yaml
- Add _reusable-pulumi-deploy.yml with deploy_profile (dev_cd, staging_up, prod_cd, preview_all)
- Thin wrappers: cd-deploy-dev, cd-promote-dev-to-staging, cd-deploy-prod; PR integration ci-stack-map-pulumi-preview
- Align dev stack-map deploy_order with layer_1/layer_2 + platform dev
- Document inputs and wrapper mapping in infra/ci/README.md

Co-authored-by: Jake Bailey <asaxplayinghorse@gmail.com>
@gankoji gankoji marked this pull request as ready for review April 12, 2026 23:22
@gankoji gankoji linked an issue Apr 12, 2026 that may be closed by this pull request
7 tasks
@gankoji gankoji self-assigned this Apr 12, 2026
@gankoji gankoji merged commit a2ff52b into main Apr 12, 2026
9 checks passed
@gankoji gankoji deleted the cursor/ci-parameterized-pulumi-deploy-682-3e0a branch April 12, 2026 23:27
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.

ci: parameterized deploy workflows (lane / stack prefix inputs)

2 participants