Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
1 of 2 tasks
acomagu opened this issue Nov 29, 2024 · 7 comments
Closed
1 of 2 tasks

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

acomagu opened this issue Nov 29, 2024 · 7 comments
Labels
effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2 package/tools Related to AWS CDK Tools or CLI

Comments

@acomagu
Copy link
Contributor

acomagu commented Nov 29, 2024

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

@acomagu acomagu added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Nov 29, 2024
@github-actions github-actions bot added the package/tools Related to AWS CDK Tools or CLI label Nov 29, 2024
@ashishdhingra ashishdhingra self-assigned this Nov 29, 2024
@ashishdhingra ashishdhingra added p2 investigating This issue is being investigated and/or work is in progress to resolve the issue. and removed needs-triage This issue or PR still needs to be triaged. labels Nov 29, 2024
@ashishdhingra
Copy link
Contributor

ashishdhingra commented Nov 29, 2024

Appears to be valid feature request to support build option in cdk.json, similar to other options like app and versionReporting. Team could review if there are any concerns to support build key in cdk.json.

@acomagu Feel free to contribute PR that could be reviewed by the team. They should get back to you in case of any concerns or review comments.

@ashishdhingra ashishdhingra added effort/small Small work item – less than a day of effort and removed investigating This issue is being investigated and/or work is in progress to resolve the issue. labels Nov 29, 2024
@ashishdhingra ashishdhingra removed their assignment Nov 29, 2024
@acomagu
Copy link
Contributor Author

acomagu commented Nov 30, 2024

@ashishdhingra Thank you for your insight! Unfortunately I won't be able to start working on PR in at least a week, but I intend to do it sooner or later.

But I also don't intend to prevent others from make PR.

@tmokmss
Copy link
Contributor

tmokmss commented Nov 30, 2024

Afaik this feature has already been available via cdk.json.

edit) found the PR: #17176. It seems ~/cdk.json (user config) is not supported though. Is this the feature you need?

@ashishdhingra
Copy link
Contributor

Afaik this feature has already been available via cdk.json.

edit) found the PR: #17176. It seems ~/cdk.json (user config) is not supported though. Is this the feature you need?

@tmokmss Thanks for your reply. Unsure if this is documented in CDK guide.

@acomagu Could you please give it a try and if it works, kindly close the issue.

@tmokmss
Copy link
Contributor

tmokmss commented Nov 30, 2024

@ashishdhingra I found this doc somewhat relevant:

You can pass options through command-line arguments. For most options, you can configure them in a cdk.json configuration file.
https://docs.aws.amazon.com/cdk/v2/guide/ref-cli-cmd.html#ref-cli-cmd-configure

But the problem is that it is not clear what most options are 😓

@rix0rrr
Copy link
Contributor

rix0rrr commented Dec 2, 2024

Thanks for the feedback. I'll pass this note along for considerations of consistency for some upcoming work.

@rix0rrr rix0rrr closed this as completed Dec 2, 2024
Copy link

github-actions bot commented Dec 2, 2024

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2 package/tools Related to AWS CDK Tools or CLI
Projects
None yet
Development

No branches or pull requests

4 participants