diff --git a/oci/client/pull.go b/oci/client/pull.go index 4776538c0..d4828687f 100644 --- a/oci/client/pull.go +++ b/oci/client/pull.go @@ -48,6 +48,7 @@ func (c *Client) Pull(ctx context.Context, url, outDir string) (*Metadata, error } meta := MetadataFromAnnotations(manifest.Annotations) + meta.URL = url meta.Digest = ref.Context().Digest(digest.String()).String() layers, err := img.Layers() diff --git a/oci/client/pull_test.go b/oci/client/pull_test.go index 58c70bc84..772ffd202 100644 --- a/oci/client/pull_test.go +++ b/oci/client/pull_test.go @@ -64,6 +64,7 @@ func Test_PullAnyTarball(t *testing.T) { g.Expect(m.Created).To(BeEmpty()) g.Expect(m.Revision).To(BeEmpty()) g.Expect(m.Source).To(BeEmpty()) + g.Expect(m.URL).To(Equal(dst)) g.Expect(m.Digest).ToNot(BeEmpty()) g.Expect(extractTo).To(BeADirectory())