Skip to content

Commit 992e6bd

Browse files
feat(ci): synth-per-variant build with github:* context in artifact (#91)
* feat(ci): add CDK synth-per-variant with artifact upload in build.yml Add matrix strategy (agentcore variant) to build job. After the full mise build, synthesize CDK output per variant and upload as immutable artifact for downstream deploy workflow consumption. Refs: #73 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(ci): remove redundant git diff exclusion The .gitignore already excludes /cdk/cdk-*.out/, so git add . never stages synth output — the pathspec exclusion was belt-and- suspenders with no effect. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: remove explicit retention days for artifact uploads Removed retention days for uploaded artifacts in build workflow. * refactor(ci): use mise build synth output instead of redundant cdk synth step Remove the separate `npx cdk synth` step — `mise run build` already runs `cdk synth -q` via the //cdk:build task chain. Upload the existing cdk/cdk.out/ directly as the variant artifact. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * feat(ci): pass computeVariant context via CDK_CONTEXT env var CDK reads CDK_CONTEXT_<key> env vars as context values, so setting CDK_CONTEXT_computeVariant=${{ matrix.variant }} flows the variant through mise run build → cdk synth without modifying mise tasks. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * feat(ci): generate cdk.context.json with github:* tags before build Replace CDK_CONTEXT env var with a cdk.context.json generation step that populates all 13 github:* tag values plus computeVariant and stackName. CDK reads cdk.context.json automatically during synth, so tags are baked into templates and carried in the artifact for deploy.yml to use without re-synthesis. Event-specific resolution normalizes github.sha/ref/head-ref across pull_request, merge_group, push, and workflow_dispatch triggers. All GitHub context is passed through env: variables to prevent script injection (CWE-78). Refs: #73 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(ci): include cdk.context.json in CDK artifact upload CDK does not copy cdk.context.json into cdk.out/ during synthesis. Include it explicitly in the artifact so deploy.yml and release assets carry provenance of what context produced the templates. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: scottschreckengaust <345885+scottschreckengaust@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 5d9748f commit 992e6bd

2 files changed

Lines changed: 110 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 109 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.gitignore

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)