-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Provenance field in TaskRun&PipelineRun status
Change 1: Add a Provenance field in TaskRun&PipelineRun status that currently only contains configsource data, but can be extended later to have more provenance-related fields. Change 2: Prior, #5551 introduced the ConfigSource to api/resolution alpha & beta package. In this PR, we moved the ConfigSource to api/pipeline alpha & beta package for the provenance field to reuse that type (cannot import the api/resolution alpha because of import cycle). Why: See the motivation and discussions in #5550. The tldr is that it helps pass provenance-related data in a more structured way ConfigSource is one example. Signed-off-by: Chuang Wang <chuangw@google.com>
- Loading branch information
Showing
30 changed files
with
519 additions
and
197 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
Copyright 2022 The Tekton Authors | ||
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 v1 | ||
|
||
// Provenance contains all the information that needs to be recorded in a provenance i.e. ConfigSource | ||
type Provenance struct { | ||
Source *ConfigSource `json:"source,omitempty"` | ||
} | ||
|
||
// ConfigSource records where the task/pipeline file came from. | ||
type ConfigSource struct { | ||
// URI indicating the identity of the source of the config. | ||
// https://github.com/in-toto/attestation/blob/main/spec/field_types.md#ResourceURI | ||
// Example: https://github.com/tektoncd/catalog | ||
URI string `json:"uri,omitempty"` | ||
|
||
// Digest is a collection of cryptographic digests for the contents of the artifact specified by URI. | ||
// https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet | ||
// Example: {"sha1": "f99d13e554ffcb696dee719fa85b695cb5b0f428"} | ||
Digest map[string]string `json:"digest,omitempty"` | ||
|
||
// EntryPoint identifying the entry point into the build. This is often a path to a | ||
// configuration file and/or a target label within that file. | ||
// Example: "task/git-clone/0.8/git-clone.yaml" | ||
EntryPoint string `json:"entryPoint,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.