153 lines
5.5 KiB
YAML
153 lines
5.5 KiB
YAML
# Copyright 2021 kubeflow.org
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
apiVersion: tekton.dev/v1beta1
|
|
kind: PipelineRun
|
|
metadata:
|
|
name: para-loop-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: '{"para-loop-inner-op1": [], "para-loop-inner-op2":
|
|
[], "para-loop-out-op": []}'
|
|
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": "my_pipe_param",
|
|
"optional": true, "type": "String"}], "name": "para-loop-pipeline"}'
|
|
spec:
|
|
params:
|
|
- name: my_pipe_param
|
|
value: '10'
|
|
pipelineSpec:
|
|
params:
|
|
- name: my_pipe_param
|
|
default: '10'
|
|
tasks:
|
|
- name: para-loop-out-op
|
|
params:
|
|
- name: my_pipe_param
|
|
value: $(params.my_pipe_param)
|
|
taskSpec:
|
|
steps:
|
|
- name: main
|
|
args:
|
|
- |
|
|
echo $0
|
|
- $(inputs.params.my_pipe_param)
|
|
command:
|
|
- sh
|
|
- -c
|
|
image: library/bash:4.4.23
|
|
params:
|
|
- name: my_pipe_param
|
|
metadata:
|
|
labels:
|
|
pipelines.kubeflow.org/pipelinename: ''
|
|
pipelines.kubeflow.org/generation: ''
|
|
pipelines.kubeflow.org/cache_enabled: "true"
|
|
annotations:
|
|
pipelines.kubeflow.org/component_spec_digest: '{"name": "para-loop-out-op",
|
|
"outputs": [], "version": "para-loop-out-op@sha256=2ffc845c5b44a975d837ef6a728f691bf97fb1ae8168ed429af14d94aaafaf4d"}'
|
|
tekton.dev/template: ''
|
|
timeout: 525600m
|
|
- name: para-loop-pipeline-for-loop-2
|
|
params:
|
|
- name: loop-item-param-1
|
|
value: '[1, 2, 3]'
|
|
- name: my_pipe_param
|
|
value: $(params.my_pipe_param)
|
|
taskSpec:
|
|
apiVersion: custom.tekton.dev/v1alpha1
|
|
kind: PipelineLoop
|
|
spec:
|
|
pipelineSpec:
|
|
params:
|
|
- name: loop-item-param-1
|
|
type: string
|
|
- name: my_pipe_param
|
|
type: string
|
|
tasks:
|
|
- name: para-loop-inner-op1
|
|
params:
|
|
- name: loop-item-param-1
|
|
value: $(params.loop-item-param-1)
|
|
- name: my_pipe_param
|
|
value: $(params.my_pipe_param)
|
|
taskSpec:
|
|
steps:
|
|
- name: main
|
|
args:
|
|
- |
|
|
echo op1 $0 $1
|
|
- $(inputs.params.loop-item-param-1)
|
|
- $(inputs.params.my_pipe_param)
|
|
command:
|
|
- sh
|
|
- -c
|
|
image: library/bash:4.4.23
|
|
params:
|
|
- name: loop-item-param-1
|
|
type: string
|
|
- name: my_pipe_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": "para-loop-inner-op1",
|
|
"outputs": [], "version": "para-loop-inner-op1@sha256=3f0d81fcc84addea722cbc93871ed081edde0ee5273c7543470ece4dd530cd78"}'
|
|
tekton.dev/template: ''
|
|
timeout: 525600m
|
|
- name: para-loop-inner-op2
|
|
params:
|
|
- name: loop-item-param-1
|
|
value: $(params.loop-item-param-1)
|
|
taskSpec:
|
|
steps:
|
|
- name: main
|
|
args:
|
|
- |
|
|
echo op2 $0
|
|
- $(inputs.params.loop-item-param-1)
|
|
command:
|
|
- sh
|
|
- -c
|
|
image: library/bash:4.4.23
|
|
params:
|
|
- name: loop-item-param-1
|
|
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": "para-loop-inner-op2",
|
|
"outputs": [], "version": "para-loop-inner-op2@sha256=fbc1104d87b80e5c2e81dedd9df4f8def400447d5ddb8f5972860eda7962c349"}'
|
|
tekton.dev/template: ''
|
|
timeout: 525600m
|
|
parallelism: 5
|
|
iterateParam: loop-item-param-1
|
|
metadata:
|
|
labels:
|
|
pipelines.kubeflow.org/pipelinename: ''
|
|
pipelines.kubeflow.org/generation: ''
|
|
pipelines.kubeflow.org/cache_enabled: "true"
|
|
timeout: 525600m
|