cnabio / cnab-to-oci

Tool to convert CNAB bundle.json to OCI index
Apache License 2.0
54 stars 41 forks source link

Add helper --raw flag for pull to inspect raw manifest from registry #38

Closed radu-matei closed 5 years ago

radu-matei commented 5 years ago

closes #37

This PR exposes remotes.getIndex (now remotes.GetIndex) so it can be used from outside the package, and adds a --raw flag for cnab-to-oci pull that writes the actual index to file instead of the converted bundle.

radu-matei commented 5 years ago

The end-to-end test seems to be failing, although I'm not entirely sure it's because of this PR:

# docker-app bundle /examples/hello-world/hello-world.dockerapp --invocation-image hello-world:0.1.0-invoc --namespace localhost:32768/e2e --out /tmp/TestPushAndPullCNAB-594028984/bundle.json
Error: cannot locate application "/examples/hello-world/hello-world.dockerapp" on filesystem

--- FAIL: TestPushAndPullCNAB (5.36s)
    e2e_test.go:66: assertion failed: 
        Command:  docker-app bundle /examples/hello-world/hello-world.dockerapp --invocation-image hello-world:0.1.0-invoc --namespace localhost:32768/e2e --out /tmp/TestPushAndPullCNAB-594028984/bundle.json
        ExitCode: 1
        Error:    exit status 1
        Stdout:   
        Stderr:   Error: cannot locate application "/examples/hello-world/hello-world.dockerapp" on filesystem

        Failures:
        ExitCode was 1 expected 0
        Expected no error
FAIL

Yeah, this is because https://github.com/docker/app/tree/master/examples/hello-world changed.

radu-matei commented 5 years ago

Implemented in #60.