Skip to content

Commit

Permalink
Add a new field for the resourceName.
Browse files Browse the repository at this point in the history
  • Loading branch information
dlorenc committed May 29, 2020
1 parent 2ec1664 commit 7cb78eb
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions cmd/git-init/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ func main() {
ResourceRef: v1beta1.PipelineResourceRef{
Name: resourceName,
},
ResourceName: resourceName,
},
}

Expand Down
5 changes: 3 additions & 2 deletions cmd/imagedigestexporter/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,9 @@ func main() {
logger.Fatalf("Unexpected error getting image digest for %s: %v", imageResource.Name, err)
}
output = append(output, v1beta1.PipelineResourceResult{
Key: "digest",
Value: digest.String(),
Key: "digest",
Value: digest.String(),
ResourceName: imageResource.Name,
ResourceRef: v1beta1.PipelineResourceRef{
Name: imageResource.Name,
},
Expand Down
7 changes: 5 additions & 2 deletions pkg/apis/pipeline/v1beta1/resource_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,11 @@ type PipelineResourceBinding struct {

// PipelineResourceResult used to export the image name and digest as json
type PipelineResourceResult struct {
Key string `json:"key"`
Value string `json:"value"`
Key string `json:"key"`
Value string `json:"value"`
ResourceName string `json:"resourceName,omitempty"`
// This field should be deprecated and removed in the next API version.
// See https://github.com/tektoncd/pipeline/issues/2694 for more information.
ResourceRef PipelineResourceRef `json:"resourceRef,omitempty"`
ResultType ResultType `json:"type,omitempty"`
}
Expand Down

0 comments on commit 7cb78eb

Please sign in to comment.