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 image resource to configure exact repo #38

Merged
merged 1 commit into from
Dec 21, 2022

Conversation

imjasonh
Copy link
Member

@imjasonh imjasonh commented Dec 17, 2022

Progress toward #37

With this change there are now three places you can configure the repo:

  1. set the KO_DOCKER_REPO env var and everything just works, you get ko build -P behavior.
  2. set the provider's repo or docker_repo (deprecated); this overrides (1), you get ko build -P behavior.
  3. set the image resource's repo; this overrides (1) and (2), and you get ko build --bare behavior.

if opts.koDockerRepo == "" && opts.imageRepo == "" {
return "", errors.New("one of KO_DOCKER_REPO env var, or provider `docker_repo` or `repo`, or image resource `repo` must be set")
}
po := []publish.Option{publish.WithAuthFromKeychain(authn.DefaultKeychain)}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rando thought: should we make this use the helpers automatically?

I think we did it in ko itself, so it might be nice for parity.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah good call. I'll send a separate PR.

@imjasonh imjasonh merged commit c68eafd into ko-build:main Dec 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants