-
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.
Prior, a field named Source was introduced to `ResolutionRequest` status to record the source where the remote resource came from. And the individual resolvers need to implement the Source function to set the correct source value. But the method in ociresolver returns a nil value. Now, we return correct source value with the 3 subfields: url, digest and entrypoint - url: [image repository name](https://pkg.go.dev/github.com/google/[email protected]/pkg/name#Repository.Name) - digest: image digest - entrypoint: resource name in the OCI bundle Signed-off-by: Chuang Wang <[email protected]>
- Loading branch information
Showing
2 changed files
with
86 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -81,6 +81,73 @@ spec: | |
value: "tekton pipelines" | ||
``` | ||
|
||
## `ResolutionRequest` Status | ||
`ResolutionRequest.Status.Source` field captures the source where the remote resource came from. It includes the 3 subfields: `url`, `digest` and `entrypoint`. | ||
- `url`: [image repository name](https://pkg.go.dev/github.com/google/[email protected]/pkg/name#Repository.Name) | ||
- `digest`: image digest | ||
- `entrypoint`: the resource name in the OCI bundle | ||
|
||
Example: | ||
- TaskRun Resolution | ||
```yaml | ||
apiVersion: tekton.dev/v1beta1 | ||
kind: TaskRun | ||
metadata: | ||
name: remote-task-reference | ||
spec: | ||
taskRef: | ||
resolver: bundles | ||
params: | ||
- name: bundle | ||
value: gcr.io/tekton-releases/catalog/upstream/git-clone:0.7 | ||
- name: name | ||
value: git-clone | ||
- name: kind | ||
value: task | ||
params: | ||
- name: url | ||
value: https://github.com/octocat/Hello-World | ||
workspaces: | ||
- name: output | ||
volumeClaimTemplate: | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: 500Mi | ||
``` | ||
|
||
- `ResolutionRequest` | ||
```yaml | ||
apiVersion: resolution.tekton.dev/v1beta1 | ||
kind: ResolutionRequest | ||
metadata: | ||
... | ||
labels: | ||
resolution.tekton.dev/type: bundles | ||
name: bundles-21ad80ec13f3e8b73fed5880a64d4611 | ||
... | ||
spec: | ||
params: | ||
- name: bundle | ||
value: gcr.io/tekton-releases/catalog/upstream/git-clone:0.7 | ||
- name: name | ||
value: git-clone | ||
- name: kind | ||
value: task | ||
status: | ||
annotations: ... | ||
... | ||
data: xxx | ||
observedGeneration: 1 | ||
source: | ||
digest: | ||
sha256: f51ca50f1c065acba8290ef14adec8461915ecc5f70a8eb26190c6e8e0ededaf | ||
entryPoint: git-clone | ||
uri: gcr.io/tekton-releases/catalog/upstream/git-clone | ||
``` | ||
|
||
--- | ||
|
||
Except as otherwise noted, the content of this page is licensed under the | ||
|
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