Skip to content

0.2.38

@tarilabs tarilabs tagged this 11 Feb 17:42
this change provide a new API using ORAS-py to perform
copy from oci-layout (on disk) to OCI registry, re-using
existing APIs.

- document README.md of creation ocilayout testing
- provide hints about test data directory ocilayout_data
- the test data should be excluded from pre-commit formatting

also tested locally with:

```sh
podman run -d -p 5000:5000 --name test-registry ghcr.io/oras-project/registry:latest
ORAS_HOST=localhost ORAS_PORT=5000 pytest oras/tests/test_layout.py -v
```

also re-tested manually the resulting upload with:

```sh
skopeo copy --src-tls-verify=false docker://localhost:5000/dinosaur/layout-single:v1 oci:output:latest
diff -r output/ oras/tests/ocilayout_data/ocilayout1
skopeo copy --src-tls-verify=false --multi-arch all docker://localhost:5000/dinosaur/layout-multi:v1 oci:output:latest
diff -r output/ oras/tests/ocilayout_data/ocilayout2
```

resulting in the same blobs.

Please notice:
the oci-layout test examples use Image Manifest and Index Manifest to
ensure compatibility with the expected semantic of copy, therefore the
spec use-case of moving from oci-layout on disk to OCI registry;
by adhering to the OCI spec, this includes OCI Artifact use-cases.

Signed-off-by: tarilabs <matteo.mortari@gmail.com>

add memo for the credentials fixture

Signed-off-by: tarilabs <matteo.mortari@gmail.com>

implement review: rename Dockerfile

- just use Dockerfile
- adjust podman command
- confirmed commands successful

Signed-off-by: tarilabs <matteo.mortari@gmail.com>

nit: oneliner and make lint

Signed-off-by: tarilabs <matteo.mortari@gmail.com>

nit: ignore space

Signed-off-by: tarilabs <matteo.mortari@gmail.com>

impl. review: use defaults.py for const lowercase

Signed-off-by: tarilabs <matteo.mortari@gmail.com>

impl. review: use read_json() where possible

Signed-off-by: tarilabs <matteo.mortari@gmail.com>

impl review: use jsonschema for Index

Signed-off-by: tarilabs <matteo.mortari@gmail.com>

impl review: avoid intro var where possible

Signed-off-by: tarilabs <matteo.mortari@gmail.com>

impl feedback intro OCILayout class

Signed-off-by: tarilabs <matteo.mortari@gmail.com>

linting

Signed-off-by: tarilabs <matteo.mortari@gmail.com>

simplification and linting

Signed-off-by: tarilabs <matteo.mortari@gmail.com>

impl review feedback, name it Layout

Signed-off-by: tarilabs <matteo.mortari@gmail.com>

impl feedback, move into oras/layout/layout.py

see https://github.com/oras-project/oras-py/pull/228#discussion_r2755496334

Signed-off-by: tarilabs <matteo.mortari@gmail.com>

impl feedback, add validation.py and NewLayout fn

Signed-off-by: tarilabs <matteo.mortari@gmail.com>

linting

Signed-off-by: tarilabs <matteo.mortari@gmail.com>

fix typo in oras/tests/ocilayout_data

Signed-off-by: tarilabs <matteo.mortari@gmail.com>

changelog and version bump

per usual oras-py workflow

Signed-off-by: tarilabs <matteo.mortari@gmail.com>
Assets 2
Loading