-
Notifications
You must be signed in to change notification settings - Fork 251
return an image digest from DockerImageReference string #785
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
Conversation
a6b58c4 to
8d14921
Compare
|
/assign @dmage |
3617fff to
af2fa04
Compare
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: dmage, sallyom The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
af2fa04 to
45b3644
Compare
|
New changes are detected. LGTM label has been removed. |
|
/retest |
|
|
||
| // GetSpecDigest returns the image digest from a DockerImageReference string. | ||
| // example 'sha:22204fa2...' in an image 'registry/ocp/release@sha:22204fa2...' | ||
| func GetSpecDigest(spec string) (string, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this is needed when we can use Parse and then read resulting ref.ID?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
correct, closing this lol
|
this is not needed see above comment, closing |
I've found I need this for oc here: openshift/oc#395
This adds function to return an image digest from a string rather than going through a registry (to get the digest for tools from release payload mirrored from a registry you may not have access to in disconnected environments)
ie, this requires registry access: https://github.com/openshift/oc/blob/master/pkg/cli/admin/release/info.go#L675