From 86aa9ed1a9cc6b73bff37ee1a70fb2bef8ac4ab7 Mon Sep 17 00:00:00 2001 From: chhsia0 Date: Thu, 22 Aug 2019 19:15:12 -0700 Subject: [PATCH 1/3] Made the image digest exporter report image digest if there is only one image. Currently the image digest exporter does not implemented the behavior described in the resources doc, which says "if there are multiple versions of the image, the latest will be used." Instead, it reports the digest of `index.json`, which is an image index. This behavior introduces a usability issue: one of the major public container registry --- dockerhub --- does not support OCI image indices, and there are very few tools (if any) that support converting OCI image indices to docker manifest lists. Skopeo currently only support pushing an OCI image index that contain only one image. If the index has more than one images, it requires the user to specify one: https://github.com/containers/skopeo/issues/107 https://github.com/containers/image/pull/400 Essentially, these limitations make the image digest exporter useless. To make this feature useful, the exporter could instead implement the following behavior: 1. If there is only one image in `index.json`, report the image's digest. 2. If there are multiple images, report the digest of the full index. The advantage of this behavior is that, we can immediately use it (in conjunction of https://github.com/GoogleContainerTools/kaniko/pull/744), yet if multi-image manifests are more widely supported, the image digest exporter can still support that without any modification. --- cmd/imagedigestexporter/main.go | 15 +++++++++++++-- docs/resources.md | 6 +++--- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/cmd/imagedigestexporter/main.go b/cmd/imagedigestexporter/main.go index e67eb376035..f5c3c14143b 100644 --- a/cmd/imagedigestexporter/main.go +++ b/cmd/imagedigestexporter/main.go @@ -22,6 +22,7 @@ import ( "log" "os" + "github.com/google/go-containerregistry/pkg/v1" "github.com/google/go-containerregistry/pkg/v1/layout" v1alpha1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1alpha1" ) @@ -55,9 +56,19 @@ func main() { log.Printf("ImageResource %s doesn't have an index.json file: %s", imageResource.Name, err) continue } - digest, err := ii.Digest() + // If there is only one image in the index, report the digest of the image; otherwise, report the digest of the whole index. + digest, err := func() (v1.Hash, error) { + im, err := ii.IndexManifest() + if err != nil { + return v1.Hash{}, err + } + if len(im.Manifests) == 1 { + return im.Manifests[0].Digest, nil + } + return ii.Digest() + }() if err != nil { - log.Fatalf("Unexpected error getting image digest %v: %v", imageResource, err) + log.Fatalf("Unexpected error getting image digest for %s: %v", imageResource.Name, err) } output = append(output, v1alpha1.PipelineResourceResult{Name: imageResource.Name, Digest: digest.String()}) } diff --git a/docs/resources.md b/docs/resources.md index b8aa2929adb..dd3abd8a683 100644 --- a/docs/resources.md +++ b/docs/resources.md @@ -289,9 +289,9 @@ To surface the image digest in the output of the `taskRun` the builder tool should produce this information in a [OCI Image Spec](https://github.com/opencontainers/image-spec/blob/master/image-layout.md) `index.json` file. This file should be placed on a location as specified in the -task definition under the resource `outputImageDir`. Annotations in `index.json` -will be ignored, and if there are multiple versions of the image, the latest -will be used. +task definition under the resource `outputImageDir`. If there is only one image +in the `index.json` file, the digest of that image is exported; otherwise, the +digest of the whole image index would be exported. For example this build-push task defines the `outputImageDir` for the `builtImage` resource in `/workspace/buildImage` From 8aabc3fb15a933b75563fbc2ec469e04b712d9d0 Mon Sep 17 00:00:00 2001 From: chhsia0 Date: Wed, 4 Sep 2019 08:13:56 -0700 Subject: [PATCH 2/3] Added a unit test. --- Gopkg.lock | 6 +- cmd/imagedigestexporter/digest.go | 18 +++ cmd/imagedigestexporter/digest_test.go | 65 +++++++++ cmd/imagedigestexporter/main.go | 13 +- .../go-containerregistry/pkg/v1/empty/doc.go | 16 +++ .../pkg/v1/empty/image.go | 22 +++ .../pkg/v1/empty/index.go | 59 ++++++++ .../go-containerregistry/pkg/v1/random/doc.go | 16 +++ .../pkg/v1/random/image.go | 135 ++++++++++++++++++ .../pkg/v1/random/index.go | 106 ++++++++++++++ 10 files changed, 443 insertions(+), 13 deletions(-) create mode 100644 cmd/imagedigestexporter/digest.go create mode 100644 cmd/imagedigestexporter/digest_test.go create mode 100644 vendor/github.com/google/go-containerregistry/pkg/v1/empty/doc.go create mode 100644 vendor/github.com/google/go-containerregistry/pkg/v1/empty/image.go create mode 100644 vendor/github.com/google/go-containerregistry/pkg/v1/empty/index.go create mode 100644 vendor/github.com/google/go-containerregistry/pkg/v1/random/doc.go create mode 100644 vendor/github.com/google/go-containerregistry/pkg/v1/random/image.go create mode 100644 vendor/github.com/google/go-containerregistry/pkg/v1/random/index.go diff --git a/Gopkg.lock b/Gopkg.lock index afac4fcc9a1..055050af59b 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -265,15 +265,17 @@ version = "v0.3.0" [[projects]] - digest = "1:4e5cb332228be45d486c2e112e35fe0106dfd8b9fa0da88abc5b6e1f2d918cca" + digest = "1:729f263f2e42c3dddf2de8f62b7d1236560346d89b546f6ac87fdf1a92c9547c" name = "github.com/google/go-containerregistry" packages = [ "pkg/authn", "pkg/authn/k8schain", "pkg/name", "pkg/v1", + "pkg/v1/empty", "pkg/v1/layout", "pkg/v1/partial", + "pkg/v1/random", "pkg/v1/remote", "pkg/v1/remote/transport", "pkg/v1/stream", @@ -1320,8 +1322,10 @@ "github.com/google/go-containerregistry/pkg/authn/k8schain", "github.com/google/go-containerregistry/pkg/name", "github.com/google/go-containerregistry/pkg/v1", + "github.com/google/go-containerregistry/pkg/v1/empty", "github.com/google/go-containerregistry/pkg/v1/layout", "github.com/google/go-containerregistry/pkg/v1/partial", + "github.com/google/go-containerregistry/pkg/v1/random", "github.com/google/go-containerregistry/pkg/v1/remote", "github.com/google/go-containerregistry/pkg/v1/types", "github.com/google/go-github/github", diff --git a/cmd/imagedigestexporter/digest.go b/cmd/imagedigestexporter/digest.go new file mode 100644 index 00000000000..7141ee12fb7 --- /dev/null +++ b/cmd/imagedigestexporter/digest.go @@ -0,0 +1,18 @@ +package main + +import ( + "github.com/google/go-containerregistry/pkg/v1" +) + +// GetDigest returns the digest of an OCI image index. If there is only one image in the index, the +// digest of the image is returned; otherwise, the digest of the whole index is returned. +func GetDigest(ii v1.ImageIndex) (v1.Hash, error) { + im, err := ii.IndexManifest() + if err != nil { + return v1.Hash{}, err + } + if len(im.Manifests) == 1 { + return im.Manifests[0].Digest, nil + } + return ii.Digest() +} diff --git a/cmd/imagedigestexporter/digest_test.go b/cmd/imagedigestexporter/digest_test.go new file mode 100644 index 00000000000..244ce18712f --- /dev/null +++ b/cmd/imagedigestexporter/digest_test.go @@ -0,0 +1,65 @@ +package main + +import ( + "testing" + + "github.com/google/go-cmp/cmp" + "github.com/google/go-containerregistry/pkg/v1" + "github.com/google/go-containerregistry/pkg/v1/empty" + "github.com/google/go-containerregistry/pkg/v1/random" +) + +func TestGetDigest(t *testing.T) { + mustGetIndex := func(ii v1.ImageIndex, err error) v1.ImageIndex { + if err != nil { + t.Fatalf("must get image: %s", err) + } + return ii + } + mustGetManifest := func(im *v1.IndexManifest, err error) *v1.IndexManifest { + if err != nil { + t.Fatalf("must get manifest: %s", err) + } + return im + } + mustGetDigest := func(h v1.Hash, err error) v1.Hash { + if err != nil { + t.Fatalf("must get digest: %s", err) + } + return h + } + indexSingleImage := mustGetIndex(random.Index(1024, 4, 1)) + indexMultipleImages := mustGetIndex(random.Index(1024, 4, 4)) + tests := []struct { + name string + index v1.ImageIndex + expected v1.Hash + }{ + { + name: "empty index", + index: empty.Index, + expected: mustGetDigest(empty.Index.Digest()), + }, + { + name: "index with single image", + index: indexSingleImage, + expected: mustGetManifest(indexSingleImage.IndexManifest()).Manifests[0].Digest, + }, + { + name: "index with multiple images", + index: indexMultipleImages, + expected: mustGetDigest(indexMultipleImages.Digest()), + }, + } + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + digest, err := GetDigest(test.index) + if err != nil { + t.Fatalf("cannot get digest: %s", err) + } + if diff := cmp.Diff(digest, test.expected); diff != "" { + t.Errorf("get digest: -want +got: %s", diff) + } + }) + } +} diff --git a/cmd/imagedigestexporter/main.go b/cmd/imagedigestexporter/main.go index f5c3c14143b..a9d0a46e5d9 100644 --- a/cmd/imagedigestexporter/main.go +++ b/cmd/imagedigestexporter/main.go @@ -22,7 +22,6 @@ import ( "log" "os" - "github.com/google/go-containerregistry/pkg/v1" "github.com/google/go-containerregistry/pkg/v1/layout" v1alpha1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1alpha1" ) @@ -56,17 +55,7 @@ func main() { log.Printf("ImageResource %s doesn't have an index.json file: %s", imageResource.Name, err) continue } - // If there is only one image in the index, report the digest of the image; otherwise, report the digest of the whole index. - digest, err := func() (v1.Hash, error) { - im, err := ii.IndexManifest() - if err != nil { - return v1.Hash{}, err - } - if len(im.Manifests) == 1 { - return im.Manifests[0].Digest, nil - } - return ii.Digest() - }() + digest, err := GetDigest(ii) if err != nil { log.Fatalf("Unexpected error getting image digest for %s: %v", imageResource.Name, err) } diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/empty/doc.go b/vendor/github.com/google/go-containerregistry/pkg/v1/empty/doc.go new file mode 100644 index 00000000000..1a521e9a743 --- /dev/null +++ b/vendor/github.com/google/go-containerregistry/pkg/v1/empty/doc.go @@ -0,0 +1,16 @@ +// Copyright 2018 Google LLC All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package empty provides an implementation of v1.Image equivalent to "FROM scratch". +package empty diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/empty/image.go b/vendor/github.com/google/go-containerregistry/pkg/v1/empty/image.go new file mode 100644 index 00000000000..fa24748a838 --- /dev/null +++ b/vendor/github.com/google/go-containerregistry/pkg/v1/empty/image.go @@ -0,0 +1,22 @@ +// Copyright 2018 Google LLC All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package empty + +import ( + "github.com/google/go-containerregistry/pkg/v1/random" +) + +// Image is a singleton empty image, think: FROM scratch. +var Image, _ = random.Image(0, 0) diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/empty/index.go b/vendor/github.com/google/go-containerregistry/pkg/v1/empty/index.go new file mode 100644 index 00000000000..a03d758fd43 --- /dev/null +++ b/vendor/github.com/google/go-containerregistry/pkg/v1/empty/index.go @@ -0,0 +1,59 @@ +// Copyright 2018 Google LLC All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package empty + +import ( + "encoding/json" + "errors" + + v1 "github.com/google/go-containerregistry/pkg/v1" + "github.com/google/go-containerregistry/pkg/v1/partial" + "github.com/google/go-containerregistry/pkg/v1/types" +) + +// Index is a singleton empty index, think: FROM scratch. +var Index = emptyIndex{} + +type emptyIndex struct{} + +func (i emptyIndex) MediaType() (types.MediaType, error) { + return types.OCIImageIndex, nil +} + +func (i emptyIndex) Digest() (v1.Hash, error) { + return partial.Digest(i) +} + +func (i emptyIndex) IndexManifest() (*v1.IndexManifest, error) { + return &v1.IndexManifest{ + SchemaVersion: 2, + }, nil +} + +func (i emptyIndex) RawManifest() ([]byte, error) { + im, err := i.IndexManifest() + if err != nil { + return nil, err + } + return json.Marshal(im) +} + +func (i emptyIndex) Image(v1.Hash) (v1.Image, error) { + return nil, errors.New("empty index") +} + +func (i emptyIndex) ImageIndex(v1.Hash) (v1.ImageIndex, error) { + return nil, errors.New("empty index") +} diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/random/doc.go b/vendor/github.com/google/go-containerregistry/pkg/v1/random/doc.go new file mode 100644 index 00000000000..d3712767d26 --- /dev/null +++ b/vendor/github.com/google/go-containerregistry/pkg/v1/random/doc.go @@ -0,0 +1,16 @@ +// Copyright 2018 Google LLC All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package random provides a facility for synthesizing pseudo-random images. +package random diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/random/image.go b/vendor/github.com/google/go-containerregistry/pkg/v1/random/image.go new file mode 100644 index 00000000000..cc269d6b51d --- /dev/null +++ b/vendor/github.com/google/go-containerregistry/pkg/v1/random/image.go @@ -0,0 +1,135 @@ +// Copyright 2018 Google LLC All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package random + +import ( + "archive/tar" + "bytes" + "crypto/rand" + "fmt" + "io" + "io/ioutil" + "time" + + v1 "github.com/google/go-containerregistry/pkg/v1" + "github.com/google/go-containerregistry/pkg/v1/partial" + "github.com/google/go-containerregistry/pkg/v1/types" +) + +// uncompressedLayer implements partial.UncompressedLayer from raw bytes. +// TODO(mattmoor): Consider moving this into a library. +type uncompressedLayer struct { + diffID v1.Hash + content []byte +} + +// DiffID implements partial.UncompressedLayer +func (ul *uncompressedLayer) DiffID() (v1.Hash, error) { + return ul.diffID, nil +} + +// Uncompressed implements partial.UncompressedLayer +func (ul *uncompressedLayer) Uncompressed() (io.ReadCloser, error) { + return ioutil.NopCloser(bytes.NewBuffer(ul.content)), nil +} + +var _ partial.UncompressedLayer = (*uncompressedLayer)(nil) + +// Image returns a pseudo-randomly generated Image. +func Image(byteSize, layers int64) (v1.Image, error) { + layerz := make(map[v1.Hash]partial.UncompressedLayer) + for i := int64(0); i < layers; i++ { + var b bytes.Buffer + tw := tar.NewWriter(&b) + if err := tw.WriteHeader(&tar.Header{ + Name: fmt.Sprintf("random_file_%d.txt", i), + Size: byteSize, + Typeflag: tar.TypeRegA, + }); err != nil { + return nil, err + } + if _, err := io.CopyN(tw, rand.Reader, byteSize); err != nil { + return nil, err + } + if err := tw.Close(); err != nil { + return nil, err + } + bts := b.Bytes() + h, _, err := v1.SHA256(bytes.NewReader(bts)) + if err != nil { + return nil, err + } + layerz[h] = &uncompressedLayer{ + diffID: h, + content: bts, + } + } + + cfg := &v1.ConfigFile{} + + // Some clients check this. + cfg.RootFS.Type = "layers" + + // It is ok that iteration order is random in Go, because this is the random image anyways. + for k := range layerz { + cfg.RootFS.DiffIDs = append(cfg.RootFS.DiffIDs, k) + } + + for i := int64(0); i < layers; i++ { + cfg.History = append(cfg.History, v1.History{ + Author: "random.Image", + Comment: fmt.Sprintf("this is a random history %d", i), + CreatedBy: "random", + Created: v1.Time{time.Now()}, + }) + } + + return partial.UncompressedToImage(&image{ + config: cfg, + layers: layerz, + }) +} + +// image is pseudo-randomly generated. +type image struct { + config *v1.ConfigFile + layers map[v1.Hash]partial.UncompressedLayer +} + +var _ partial.UncompressedImageCore = (*image)(nil) + +// RawConfigFile implements partial.UncompressedImageCore +func (i *image) RawConfigFile() ([]byte, error) { + return partial.RawConfigFile(i) +} + +// ConfigFile implements v1.Image +func (i *image) ConfigFile() (*v1.ConfigFile, error) { + return i.config, nil +} + +// MediaType implements partial.UncompressedImageCore +func (i *image) MediaType() (types.MediaType, error) { + return types.DockerManifestSchema2, nil +} + +// LayerByDiffID implements partial.UncompressedImageCore +func (i *image) LayerByDiffID(diffID v1.Hash) (partial.UncompressedLayer, error) { + l, ok := i.layers[diffID] + if !ok { + return nil, fmt.Errorf("unknown diff_id: %v", diffID) + } + return l, nil +} diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/random/index.go b/vendor/github.com/google/go-containerregistry/pkg/v1/random/index.go new file mode 100644 index 00000000000..b6dacec5acd --- /dev/null +++ b/vendor/github.com/google/go-containerregistry/pkg/v1/random/index.go @@ -0,0 +1,106 @@ +// Copyright 2018 Google LLC All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package random + +import ( + "bytes" + "encoding/json" + "fmt" + + v1 "github.com/google/go-containerregistry/pkg/v1" + "github.com/google/go-containerregistry/pkg/v1/partial" + "github.com/google/go-containerregistry/pkg/v1/types" +) + +type randomIndex struct { + images map[v1.Hash]v1.Image + manifest *v1.IndexManifest +} + +// Index returns a pseudo-randomly generated ImageIndex with count images, each +// having the given number of layers of size byteSize. +func Index(byteSize, layers, count int64) (v1.ImageIndex, error) { + manifest := v1.IndexManifest{ + SchemaVersion: 2, + Manifests: []v1.Descriptor{}, + } + + images := make(map[v1.Hash]v1.Image) + for i := int64(0); i < count; i++ { + img, err := Image(byteSize, layers) + if err != nil { + return nil, err + } + + rawManifest, err := img.RawManifest() + if err != nil { + return nil, err + } + digest, size, err := v1.SHA256(bytes.NewReader(rawManifest)) + if err != nil { + return nil, err + } + mediaType, err := img.MediaType() + if err != nil { + return nil, err + } + + manifest.Manifests = append(manifest.Manifests, v1.Descriptor{ + Digest: digest, + Size: size, + MediaType: mediaType, + }) + + images[digest] = img + } + + return &randomIndex{ + images: images, + manifest: &manifest, + }, nil +} + +func (i *randomIndex) MediaType() (types.MediaType, error) { + return types.OCIImageIndex, nil +} + +func (i *randomIndex) Digest() (v1.Hash, error) { + return partial.Digest(i) +} + +func (i *randomIndex) IndexManifest() (*v1.IndexManifest, error) { + return i.manifest, nil +} + +func (i *randomIndex) RawManifest() ([]byte, error) { + m, err := i.IndexManifest() + if err != nil { + return nil, err + } + return json.Marshal(m) +} + +func (i *randomIndex) Image(h v1.Hash) (v1.Image, error) { + if img, ok := i.images[h]; ok { + return img, nil + } + + return nil, fmt.Errorf("image not found: %v", h) +} + +func (i *randomIndex) ImageIndex(h v1.Hash) (v1.ImageIndex, error) { + // This is a single level index (for now?). + return nil, fmt.Errorf("image not found: %v", h) +} From 78b21d4c8c2cd869328ebb2cc25fd0cb8481448f Mon Sep 17 00:00:00 2001 From: chhsia0 Date: Wed, 4 Sep 2019 11:26:21 -0700 Subject: [PATCH 3/3] Fixed e2e test errors. --- cmd/imagedigestexporter/digest.go | 2 +- cmd/imagedigestexporter/digest_test.go | 2 +- examples/taskruns/task-multiple-output-image.yaml | 2 +- examples/taskruns/taskrun-cloud-event.yaml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/imagedigestexporter/digest.go b/cmd/imagedigestexporter/digest.go index 7141ee12fb7..6e8ea6f232c 100644 --- a/cmd/imagedigestexporter/digest.go +++ b/cmd/imagedigestexporter/digest.go @@ -1,7 +1,7 @@ package main import ( - "github.com/google/go-containerregistry/pkg/v1" + v1 "github.com/google/go-containerregistry/pkg/v1" ) // GetDigest returns the digest of an OCI image index. If there is only one image in the index, the diff --git a/cmd/imagedigestexporter/digest_test.go b/cmd/imagedigestexporter/digest_test.go index 244ce18712f..44607e264b7 100644 --- a/cmd/imagedigestexporter/digest_test.go +++ b/cmd/imagedigestexporter/digest_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/google/go-cmp/cmp" - "github.com/google/go-containerregistry/pkg/v1" + v1 "github.com/google/go-containerregistry/pkg/v1" "github.com/google/go-containerregistry/pkg/v1/empty" "github.com/google/go-containerregistry/pkg/v1/random" ) diff --git a/examples/taskruns/task-multiple-output-image.yaml b/examples/taskruns/task-multiple-output-image.yaml index dacb500f4c3..dc467b7804d 100644 --- a/examples/taskruns/task-multiple-output-image.yaml +++ b/examples/taskruns/task-multiple-output-image.yaml @@ -104,7 +104,7 @@ spec: } ] } - EOF + EOF --- apiVersion: tekton.dev/v1alpha1 kind: TaskRun diff --git a/examples/taskruns/taskrun-cloud-event.yaml b/examples/taskruns/taskrun-cloud-event.yaml index d855c1af2cf..419eb5cfe57 100644 --- a/examples/taskruns/taskrun-cloud-event.yaml +++ b/examples/taskruns/taskrun-cloud-event.yaml @@ -112,7 +112,7 @@ spec: { "mediaType": "application/vnd.oci.image.index.v1+json", "size": 314, - "digest": "sha256:NOTAREALDIGEST" + "digest": "sha256:deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef" } ] }