project-zot / project-zot.github.io

zotregistry.dev website
https://zotregistry.dev
Apache License 2.0
3 stars 20 forks source link

[Bug]: Update in ORAS documentation #177

Closed ADorigi closed 3 months ago

ADorigi commented 3 months ago

zot version

NA

Describe the bug

The documentation at Attach a reference using ORAS seems outdated.

To reproduce

  1. Create an artifact to attach as a reference in ZOT registry.
  2. Use oras push command as described in ZOT documentation here

Expected behavior

The artifact should be available as a reference to the given subject.

Screenshots

image

Additional context

The ORAS push command given in the user documentation for ZOT is as follows:

oras push localhost:5000/hello-artifact \
  --artifact-type 'signature/example' \
  --subject localhost:5000/hello-artifact:v2 \
  ./signature.json:application/json

The oras push command no longer has the option --subject, as evident in the ORAS documentation here.

From what I understand, the oras attach command achieves exactly what the outdated documentation above needed.

The new command should be as follows:

oras attach \
  --artifact-type signature/example \
  localhost:5000/hello-artifact:v2 \
  signature.json 
ADorigi commented 3 months ago

If acceptable, I am willing to create a pull request addressing this change in the documentation.

andaaron commented 3 months ago

Hi @ADorigi, thanks for filing this issue, please create the PR. Looks like we had updated the tests (https://github.com/project-zot/zot/blob/main/test/blackbox/pushpull.bats#L148) but forgot about the documentation.