Skip to content

cli: Respect --build option in cdk.json as well #32329

@acomagu

Description

@acomagu

Describe the feature

The --build option was introduced for cdk deploy or cdk watch command at #19663, but the equivalent field in cdk.json is not introduced.

This issue proposes to support build field to cdk.json as well as --build flag.

Use Case

Rather than add --build ./build.sh flag each time executing cdk deploy, it's convenient if we could write the build command to cdk.json, like

{
  "app": "...",
  "build": "./build.sh"
}

Proposed Solution

Support build field in cdk.json.

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

2.165.0

Environment details (OS name and version, etc.)

Linux acm-envy3-win 5.15.167.4-microsoft-standard-WSL2 #1 SMP Tue Nov 5 00:21:55 UTC 2024 x86_64 GNU/Linux

Metadata

Metadata

Assignees

Labels

effort/smallSmall work item – less than a day of effortfeature-requestA feature should be added or improved.p2package/toolsRelated to AWS CDK Tools or CLI

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions