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

korc file #143

Open
mattmoor opened this issue Mar 13, 2020 · 3 comments
Open

korc file #143

mattmoor opened this issue Mar 13, 2020 · 3 comments

Comments

@mattmoor
Copy link
Collaborator

It would be useful to be able to have a .korc file akin to a .bazelrc file that allows for certain flags to be passed by default.

For example, passing -B or -P gets tedious, and if I exclusively use a registry that supports deep nesting like GCR, I may want -P to avoid the noisy hash-based names we use by default. For a registry like ECR, where I have to create repositories manually before pushing, passing -B all the time may be necessary for the push to succeed. Another good example of this might be if I want to always pass --strict.

Initially I'd though KO_FLAGS=-B, as we do in our e2e tests, but some of these flags are context-specific (e.g. -B won't work with ko delete).

Bazel's solution to this is to allow a file in your home directory (and a few other contexts) where you can specify per-subcommand flags, e.g.

apply -B --strict
# For releases, use full paths
resolve -P --strict
delete --ignore-not-found

Wanted to put this out into the world in case someone was sufficiently motivated to implement it 😇

@github-actions
Copy link

This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Reopen the issue with /reopen. Mark the issue as
fresh by adding the comment /remove-lifecycle stale.

@jonjohnsonjr
Copy link
Collaborator

Yeah I'd love this and I'd love to deprecate the equivalent flags. Naming convention is per user not per project.

@jonjohnsonjr
Copy link
Collaborator

/remove-lifecycle stale

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants