forked from tektoncd/pipeline
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathobject-param-result.yaml
More file actions
36 lines (36 loc) · 910 Bytes
/
Copy pathobject-param-result.yaml
File metadata and controls
36 lines (36 loc) · 910 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
apiVersion: tekton.dev/v1beta1
kind: TaskRun
metadata:
generateName: object-param-result-
spec:
params:
- name: gitrepo
value:
url: "xyz.com"
commit: "sha123"
taskSpec:
params:
- name: gitrepo
type: object
properties:
url: {type: string}
commit: {type: string}
results:
- name: object-results
type: object
properties:
IMAGE_URL: {type: string}
IMAGE_DIGEST: {type: string}
steps:
- name: echo-object-params
image: bash
args: [
"echo",
"--url=$(params.gitrepo.url)",
"--commit=$(params.gitrepo.commit)"
]
- name: write-object-result
image: bash:latest
script: |
#!/usr/bin/env bash
echo -n "{\"IMAGE_URL\":\"ar.com\", \"IMAGE_DIGEST\":\"sha234\"}" > $(results.object-results.path)