Skip to content

Conversation

@sallyom
Copy link
Contributor

@sallyom sallyom commented Apr 23, 2020

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

@mfojtik
Copy link
Contributor

mfojtik commented Apr 24, 2020

/assign @dmage

@sallyom sallyom force-pushed the get-imagespec-digest branch 2 times, most recently from 3617fff to af2fa04 Compare April 24, 2020 13:50
@dmage
Copy link
Contributor

dmage commented Apr 24, 2020

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Apr 24, 2020
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: dmage, sallyom
To complete the pull request process, please assign smarterclayton
You can assign the PR to them by writing /assign @smarterclayton in a comment when ready.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@sallyom sallyom force-pushed the get-imagespec-digest branch from af2fa04 to 45b3644 Compare April 30, 2020 20:37
@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Apr 30, 2020
@openshift-ci-robot
Copy link

New changes are detected. LGTM label has been removed.

@sallyom
Copy link
Contributor Author

sallyom commented May 1, 2020

/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) {
Copy link

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

correct, closing this lol

@sallyom
Copy link
Contributor Author

sallyom commented May 4, 2020

this is not needed see above comment, closing

@sallyom sallyom closed this May 4, 2020
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.

5 participants