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

Allow specifying --[no-]-use-docker via CLI during packaging / submit #969

Closed
4naesthetic opened this issue Jan 17, 2023 · 2 comments · Fixed by #970
Closed

Allow specifying --[no-]-use-docker via CLI during packaging / submit #969

4naesthetic opened this issue Jan 17, 2023 · 2 comments · Fixed by #970
Labels
cli experience enhancement New feature or request

Comments

@4naesthetic
Copy link

When building hooks or resources we often want to use a different build configuration on a developers desktop versus in CI. Today I can only specify whether or not builds should happen in a docker container during cfn init or by modifying the .rpdk-config file, which makes it difficult to configure developers to build using docker on their local machine but have our CI workflow build without docker, as the CI workflow may already be running in a container. I can achieve this today by writing a wrapper that injects different config depending on the build environment, but it would be much easier if I could override the use_docker flag at build / packaging time.

Example CLI usage:

# Create a new project, setting use_docker to true in the initial config
cfn init

# Validate and package using the project config (build in docker container)
cfn submit --dry-run

# Validate and package without using docker, overriding the project settings, e.g. in a CI container
cfn submit --dry-run --no-use-docker
@mmaeng
Copy link
Contributor

mmaeng commented Jan 18, 2023

Thanks for the feedback, will take a look!

@mmaeng mmaeng added enhancement New feature or request cli experience wip work in progress and removed researching wip work in progress labels Jan 19, 2023
@mmaeng
Copy link
Contributor

mmaeng commented Jan 19, 2023

This PR will override the setting for use_docker in .rpdk-config during the cfn submit command. Hope that works for your use case!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli experience enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants