From 31ba6390a34337a005663b17dd6ef8dd5e948da6 Mon Sep 17 00:00:00 2001 From: Billy Zha Date: Fri, 1 Sep 2023 08:16:02 +0000 Subject: [PATCH 1/4] doc: update example for `oras push` Signed-off-by: Billy Zha --- cmd/oras/root/push.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/oras/root/push.go b/cmd/oras/root/push.go index 601ad3a55..0bae63655 100644 --- a/cmd/oras/root/push.go +++ b/cmd/oras/root/push.go @@ -69,7 +69,7 @@ Example - Push multiple files with different media types: oras push localhost:5000/hello:v1 hi.txt:application/vnd.me.hi bye.txt:application/vnd.me.bye Example - Push file "hi.txt" with config type "application/vnd.me.config": - oras push --artifact-type application/vnd.me.config localhost:5000/hello:v1 hi.txt + oras push --image-spec v1.0 --artifact-type application/vnd.me.config localhost:5000/hello:v1 hi.txt Example - Push file "hi.txt" with the custom manifest config "config.json" of the custom media type "application/vnd.me.config": oras push --config config.json:application/vnd.me.config localhost:5000/hello:v1 hi.txt From 74cc1301c06c8af101140e45d45a56378233057c Mon Sep 17 00:00:00 2001 From: Billy Zha Date: Fri, 1 Sep 2023 08:26:59 +0000 Subject: [PATCH 2/4] add example for artifact type Signed-off-by: Billy Zha --- cmd/oras/root/push.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/oras/root/push.go b/cmd/oras/root/push.go index 0bae63655..229406f3a 100644 --- a/cmd/oras/root/push.go +++ b/cmd/oras/root/push.go @@ -71,6 +71,9 @@ Example - Push multiple files with different media types: Example - Push file "hi.txt" with config type "application/vnd.me.config": oras push --image-spec v1.0 --artifact-type application/vnd.me.config localhost:5000/hello:v1 hi.txt +Example - Push file "hi.txt" with artifact type "application/vnd.example+type": + oras push --artifact-type application/vnd.example+type localhost:5000/hello:v1 hi.txt + Example - Push file "hi.txt" with the custom manifest config "config.json" of the custom media type "application/vnd.me.config": oras push --config config.json:application/vnd.me.config localhost:5000/hello:v1 hi.txt From d2dfb08b2f77b614ebf1711111e91b13cf03d2d3 Mon Sep 17 00:00:00 2001 From: Billy Zha Date: Fri, 1 Sep 2023 08:27:51 +0000 Subject: [PATCH 3/4] doc clean Signed-off-by: Billy Zha --- cmd/oras/root/push.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/oras/root/push.go b/cmd/oras/root/push.go index 229406f3a..b5060c2a0 100644 --- a/cmd/oras/root/push.go +++ b/cmd/oras/root/push.go @@ -59,7 +59,7 @@ func pushCmd() *cobra.Command { Example - Push file "hi.txt" with media type "application/vnd.oci.image.layer.v1.tar" (default): oras push localhost:5000/hello:v1 hi.txt -Example - Push file "hi.txt" and export the pushed manifest to a specified path +Example - Push file "hi.txt" and export the pushed manifest to a specified path: oras push --export-manifest manifest.json localhost:5000/hello:v1 hi.txt Example - Push file "hi.txt" with the custom media type "application/vnd.me.hi": @@ -83,10 +83,10 @@ Example - Push file to the insecure registry: Example - Push file to the HTTP registry: oras push --plain-http localhost:5000/hello:v1 hi.txt -Example - Push repository with manifest annotations +Example - Push repository with manifest annotations: oras push --annotation "key=val" localhost:5000/hello:v1 -Example - Push repository with manifest annotation file +Example - Push repository with manifest annotation file: oras push --annotation-file annotation.json localhost:5000/hello:v1 Example - Push file "hi.txt" with multiple tags: From 4ee78eb76987384113974a0882090bbfaa65962c Mon Sep 17 00:00:00 2001 From: Billy Zha Date: Fri, 1 Sep 2023 08:32:00 +0000 Subject: [PATCH 4/4] update order Signed-off-by: Billy Zha --- cmd/oras/root/push.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/oras/root/push.go b/cmd/oras/root/push.go index b5060c2a0..81ecf853a 100644 --- a/cmd/oras/root/push.go +++ b/cmd/oras/root/push.go @@ -68,11 +68,12 @@ Example - Push file "hi.txt" with the custom media type "application/vnd.me.hi": Example - Push multiple files with different media types: oras push localhost:5000/hello:v1 hi.txt:application/vnd.me.hi bye.txt:application/vnd.me.bye +Example - Push file "hi.txt" with artifact type "application/vnd.example+type": + oras push --artifact-type application/vnd.example+type localhost:5000/hello:v1 hi.txt + Example - Push file "hi.txt" with config type "application/vnd.me.config": oras push --image-spec v1.0 --artifact-type application/vnd.me.config localhost:5000/hello:v1 hi.txt -Example - Push file "hi.txt" with artifact type "application/vnd.example+type": - oras push --artifact-type application/vnd.example+type localhost:5000/hello:v1 hi.txt Example - Push file "hi.txt" with the custom manifest config "config.json" of the custom media type "application/vnd.me.config": oras push --config config.json:application/vnd.me.config localhost:5000/hello:v1 hi.txt