Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions acceptance/image/image.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ const (
)

const (
unknownConfig = "application/vnd.unknown.config.v1+json"
openPolicyAgentData = "application/vnd.cncf.openpolicyagent.data.layer.v1+json"
title = "org.opencontainers.image.title"
)
Expand Down Expand Up @@ -856,7 +855,7 @@ func createAndPushKeylessImage(ctx context.Context, imageName string) (context.C
// layers
func createAndPushPolicyBundle(ctx context.Context, imageName string, files *godog.Table) (context.Context, error) {
bundle := mutate.MediaType(empty.Image, types.OCIManifestSchema1)
bundle = mutate.ConfigMediaType(bundle, unknownConfig)
bundle = mutate.ConfigMediaType(bundle, types.OCIConfigJSON)

// add each row as a layer to the bundle
for _, row := range files.Rows {
Expand Down
3 changes: 1 addition & 2 deletions internal/tracker/oci.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import (
)

const (
unknownConfig = "application/vnd.unknown.config.v1+json"
openPolicyAgentData = "application/vnd.cncf.openpolicyagent.data.layer.v1+json"
title = "org.opencontainers.image.title"
dataFileTitle = "data/data/trusted_tekton_tasks.yml"
Expand Down Expand Up @@ -117,7 +116,7 @@ func PushImage(ctx context.Context, imageRef string, data []byte, invocation str
}

bundle := mutate.MediaType(empty.Image, types.OCIManifestSchema1)
bundle = mutate.ConfigMediaType(bundle, unknownConfig)
bundle = mutate.ConfigMediaType(bundle, types.OCIConfigJSON)
if bundle, err = mutate.Append(bundle, mutate.Addendum{
History: v1.History{
CreatedBy: invocation,
Expand Down
2 changes: 1 addition & 1 deletion internal/tracker/oci_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func TestPullImage(t *testing.T) {
yaml := []byte("data: blah")

img := mutate.MediaType(empty.Image, types.OCIManifestSchema1)
img = mutate.ConfigMediaType(img, unknownConfig)
img = mutate.ConfigMediaType(img, types.OCIConfigJSON)
img, err := mutate.Append(img, mutate.Addendum{
MediaType: openPolicyAgentData,
Layer: static.NewLayer(yaml, openPolicyAgentData),
Expand Down