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

fix repo handling in image resource #48

Merged
merged 1 commit into from
Jan 16, 2023
Merged

Conversation

imjasonh
Copy link
Member

Also add tests for resource-configured and provider-configured repos.

Instead of handling imageRepo (resource-configured) and dockerRepo (provider-configured or env-defaulted) separately and overriding later in the process, just handle one throughout and decide whether to publish as bare (when configured in the image resource).

defer srv.Close()
parts := strings.Split(srv.URL, ":")
url := fmt.Sprintf("localhost:%s/test", parts[len(parts)-1])
t.Setenv("KO_DOCKER_REPO", url)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we add a test where KO_DOCKER_REPO isn't set?

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.

2 participants