ci: parameterized Pulumi deploy from stack-map (#682)#725
Merged
Conversation
) - 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>
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.
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.yamlviascripts/ci/read-stack-map.mjs(Node + existingyamldependency fromnpm ci).What changed
scripts/ci/read-stack-map.mjs— emitsmatrix_jsonfordev_cd_full,staging_up(+ optional promote row),prod_cd, anddev_preview_all..github/workflows/_reusable-pulumi-deploy.yml—workflow_callwithdeploy_profile,git_sha, lane/target inputs;dev_preparefor BOM +pulumi-set-dev-image-tag.sh;matrix_preparerunsnpm cithen the script;deployjob usesmax-parallel: 1+fail-fast: truefor ordering.cd-deploy-dev.yml,cd-promote-dev-to-staging.yml,cd-deploy-prod.ymlnowusesthe reusable workflow withsecrets: inherit.infra/ci/stack-map.yaml—dev.deploy_orderaligned with current dev CD (layer_1/layer_2stack names + platformdev).ci-stack-map-pulumi-preview.ymlrunspreview_all/target: devwheninfra/ci/**or the reusable workflow / script changes.infra/ci/README.md— table of wrappers → core + input glossary + secrets pattern note.Parity / review notes
prod_confirmtypo guard moved into reusablematrix_prepareso oneproductionenvironment gate (no separate validate job).promote-images.shwhenstaging_include_promote_step: true(single staging environment context for tag + Pulumi).environment(development/staging/production/preview); callers do not setenvironment(avoids duplicate approval gates;secrets: inheritstill 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 devnode scripts/ci/read-stack-map.mjs emit --plan prod_cdnpm ci --ignore-scripts(validates lockfile + yaml resolution for CI step)Follow-ups (out of scope here)
infra-pulumi.ymlPR matrix to read stack-map (left optional in issue).Commit:
ba4a6774oncursor/ci-parameterized-pulumi-deploy-682-3e0a.