-
Notifications
You must be signed in to change notification settings - Fork 123
/
Copy pathbreak-task-example.yaml
98 lines (98 loc) · 3.33 KB
/
break-task-example.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
name: pipeline
annotations:
tekton.dev/output_artifacts: '{}'
tekton.dev/input_artifacts: '{}'
tekton.dev/artifact_bucket: mlpipeline
tekton.dev/artifact_endpoint: minio-service.kubeflow:9000
tekton.dev/artifact_endpoint_scheme: http://
tekton.dev/artifact_items: '{"my-in-coop1": []}'
sidecar.istio.io/inject: "false"
pipelines.kubeflow.org/big_data_passing_format: $(workspaces.$TASK_NAME.path)/artifacts/$ORIG_PR_NAME/$TASKRUN_NAME/$TASK_PARAM_NAME
pipelines.kubeflow.org/pipeline_spec: '{"inputs": [{"default": "10", "name": "param",
"optional": true, "type": "Integer"}], "name": "pipeline"}'
spec:
params:
- name: param
value: '10'
pipelineSpec:
params:
- name: param
default: '10'
tasks:
- name: pipeline-490d3-for-loop-2
params:
- name: loop-item-param-1
value: '[1, 2]'
- name: param
value: $(params.param)
taskSpec:
apiVersion: custom.tekton.dev/v1alpha1
kind: PipelineLoop
spec:
pipelineSpec:
params:
- name: loop-item-param-1
type: string
- name: param
type: string
tasks:
- name: my-in-coop1
params:
- name: loop-item-param-1
value: $(params.loop-item-param-1)
- name: param
value: $(params.param)
taskSpec:
steps:
- name: main
args:
- |
set -e
echo op1 "$0" "$1"
- $(inputs.params.loop-item-param-1)
- $(inputs.params.param)
command:
- sh
- -c
image: library/bash:4.4.23
params:
- name: loop-item-param-1
type: string
- name: param
type: string
metadata:
labels:
pipelines.kubeflow.org/pipelinename: ''
pipelines.kubeflow.org/generation: ''
pipelines.kubeflow.org/cache_enabled: "true"
annotations:
pipelines.kubeflow.org/component_spec_digest: '{"name": "my-in-coop1",
"outputs": [], "version": "my-in-coop1@sha256=8ccab3a28a39a406554d964865f2ccb0aed854a43b6de827f613eff2bccd6f8f"}'
tekton.dev/template: ''
timeout: 525600m
- name: condition-cel
params:
- name: outcome
value: $(params.loop-item-param-1) == 2
taskRef:
name: cel_condition
apiVersion: cel.tekton.dev/v1alpha1
kind: CEL
timeout: 525600m
- name: pipelineloop-break-operation
taskRef:
apiVersion: custom.tekton.dev/v1alpha1
kind: BreakTask
name: pipelineloop-break-operation
when:
- input: $(tasks.condition-cel.results.outcome)
operator: in
values:
- "true"
timeout: 525600m
parallelism: 1
iterateParam: loop-item-param-1
timeout: 525600m