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

Try to guess GCB projectID from the image name #809

Merged
merged 1 commit into from
Jul 11, 2018

Conversation

dgageot
Copy link
Contributor

@dgageot dgageot commented Jul 11, 2018

If a GCB projectId is not provided, we try to get the project from the names of the images.

That helps writing skaffold that are a bit more portable.

Signed-off-by: David Gageot [email protected]

If a GCB projectId is not provided, we try
to get the project from the names of the images.

Signed-off-by: David Gageot <[email protected]>
}

index := repoInfo.Index
if !index.Official {
Copy link
Contributor

Choose a reason for hiding this comment

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

@jonjohnsonjr is there a cleaner way to do this in go-containerregistry?

Copy link
Contributor

Choose a reason for hiding this comment

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

It might be a little bit cleaner to use ggcr, but you're going to end up having to do string surgery regardless, so I wouldn't bother.

There's no notion of "Official" images on GCR, so this isn't super meaningful.

This also won't work for domain-scoped projects, though those are pretty long deprecated by now.

@r2d4 r2d4 merged commit 6c7f756 into GoogleContainerTools:master Jul 11, 2018
@dgageot dgageot deleted the guess-gcb-projectId branch December 28, 2018 07:10
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.

3 participants