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

Default repo substitution doesn't work with the examples #1657

Closed
WoLfulus opened this issue Feb 15, 2019 · 4 comments · Fixed by #1697
Closed

Default repo substitution doesn't work with the examples #1657

WoLfulus opened this issue Feb 15, 2019 · 4 comments · Fixed by #1697
Labels
kind/bug Something isn't working

Comments

@WoLfulus
Copy link

WoLfulus commented Feb 15, 2019

Expected behavior

Values from the examples matches the return value from SubstituteDefaultRepoIntoImage function

Actual behavior

The last two examples doesn't return the same value.

Example 3 returns gcr.io/k8s-skaffold/gcr.io/k8s-skaffold/skaffold-example1 instead of gcr.io/k8s-skaffold/skaffold-example1
Example 4 returns gcr.io/k8s-skaffold/myimage/gcr.io/k8s-skaffold/skaffold-example1 instead of gcr.io/k8s-skaffold/myimage/skaffold-example1

Also, shouldn't - and _ be accepted as a valid character here

const prefixRegexStr = "gcr.io/[a-zA-Z]+/"

?

@priyawadhwa priyawadhwa added the kind/bug Something isn't working label Feb 15, 2019
@balopat
Copy link
Contributor

balopat commented Feb 15, 2019

Thanks for filing the issue!
What is your default-repo setting/exact command?

@WoLfulus
Copy link
Author

I wasn't using skaffold at the time I saw this. I just compiled the code and invoked it with the given examples on the website.

I was trying to replicate the behaviour in JavaScript because I'm working on a project that needs the image name that matches what skaffold generates. BTW: It would be nice to have a way to specify the FQIN for each container (skipping taggers)

@nkubala
Copy link
Contributor

nkubala commented Feb 26, 2019

@WoLfulus thanks for pointing this out. opened a PR to fix the regex.

@WoLfulus
Copy link
Author

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants