Skip to content

Commit

Permalink
Merge pull request #61 from mbc-net/feat/cdk-infra-diagram
Browse files Browse the repository at this point in the history
[CLI]: generate infra diagram in pipeline
  • Loading branch information
koichimurakami authored Nov 20, 2024
2 parents ad5316d + 89dc9a4 commit 10f9394
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/cli/templates/infra/.cdkgraphrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
outdir: 'graph',
outdir: '../report/infra',
}
5 changes: 1 addition & 4 deletions packages/cli/templates/infra/gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,4 @@ node_modules

# CDK asset staging directory
.cdk.staging
cdk.out

#
graph
cdk.out
7 changes: 6 additions & 1 deletion packages/cli/templates/infra/libs/pipeline-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,16 @@ export class PipelineStack extends Stack {
const testStep = new CodeBuildStep(`${prefix}Test`, {
projectName: `${prefix}Test`,
installCommands: [
'apt install graphviz -y',
'npm i -g pnpm',
'npm ci',
'pnpm --dir ./infra install --frozen-lockfile',
],
commands: ['npm run test', 'npm --prefix ./infra run test'],
commands: [
'npm run test', // source test
'npm --prefix ./infra run test', // infra snapshot test
'npm --prefix ./infra run cdk synth', // generate infra diagram
],
primaryOutputDirectory: 'report',
partialBuildSpec: BuildSpec.fromObject({
reports: {
Expand Down

0 comments on commit 10f9394

Please sign in to comment.