-
Notifications
You must be signed in to change notification settings - Fork 181
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
feat: add compatibility mode for push and attach cmd #741
Conversation
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Codecov Report
@@ Coverage Diff @@
## main #741 +/- ##
==========================================
- Coverage 73.46% 70.12% -3.34%
==========================================
Files 17 18 +1
Lines 588 616 +28
==========================================
Hits 432 432
- Misses 125 153 +28
Partials 31 31
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
cmd/oras/push.go
Outdated
if opts.ManifestMediaType == ocispec.MediaTypeArtifactManifest && opts.manifestConfigRef != "" { | ||
return errors.New("cannot pack an OCI artifact with manifest config at the same time") | ||
} |
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.
It reminds me that there will be a feature request eventually to support --config
for oras attach
.
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? The content of config doesn't matter and the media type of config can be deducted from artifact type.
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.
If they could, they will ask.
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
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.
LGTM
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.
LGTM
This reverts commit 4b13256. Signed-off-by: Billy Zha <jinzha1@microsoft.com>
cmd/oras/attach.go
Outdated
@@ -51,6 +53,14 @@ func attachCmd() *cobra.Command { | |||
Example - Attach file 'hi.txt' with type 'doc/example' to manifest 'hello:test' in registry 'localhost:5000' | |||
oras attach --artifact-type doc/example localhost:5000/hello:test hi.txt | |||
|
|||
Example - Attach file "hi.txt" with specific manifest type for packing |
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.
I would suggest always splitting the sample commands into multiple examples. If you have more than two options under a flag and put all of those sample commands under a flag example, the layout looks too verbose.
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
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.
LGTM
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.
LGTM
Resolves oras-project#739 Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Resolves #739