-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpipeline-taskrun.yaml
64 lines (64 loc) · 1.99 KB
/
pipeline-taskrun.yaml
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
apiVersion: 'api/v1'
kind: TaskRun
name: pipeline-222-run
spec:
parent: plan-run-xxx
acester: root-run-xxx
# taskRef or TaskSpec
taskRef:
name: case-111
taskSpec:
# inputs no need, will be infered from invokation
outputs:
- {name: logs, type: Artifact, fromExpression: '{{steps.ts1.outputs.logs}}'}
implementation:
steps:
# scheme from taskrun spec
- name: ts1
taskRef:
name: case-111
inputs:
- {name: dsn, value: '{{inputs.dsn}}'}
- {name: sysbench, value: "{{inputs.sysbench}}"}
timeout: '2h'
- name: ts2
taskSpec:
inputs:
- {name: dsn, type: String, default: "mysql://host/db"}
- {name: sysbench, type: Resource}
outputs:
- {name: logs, type: Artifact, valueFrom: /root/logs/}
metadata:
implementation:
container:
image: byrnedo/alpine-curl@sha256:548379d0a4a0c08b9e55d9d87a592b7d35d9ab3037f4936f5ccd09d0b625a342
command:
- sh
- -exc
- |
url="$0"
output_path="$1"
curl_options="$2"
mkdir -p "$(dirname "$output_path")"
curl --get "$url" --output "$output_path" $curl_options
- '{{inputs.dsn}}'
inputs:
- {name: upperCase, value: '{{steps.ts1.outputs.exitCode}}'}
timeout: '1h'
inputs:
- {name: dsn, value: mysql://host/db}
- {name: sysbench, type: Resource, value: "xxxxx"}
timeout: '2h'
status:
completionTime: "2021-09-22T06:24:15Z"
startTime: "2021-09-22T06:19:20Z"
phase: complete/running/pending
complete: success/fail/error
taskSpec: # from above # todo whether render after inputs
inputs:
- {name: dsn, value: mysql://host/db}
- {name: sysbench, value: "xxxxx"}
outputs:
- {name: logs, type: Artifact, s3: 's3://remotepath'}
children:
- case-111-run