kfp-tekton/sdk/python/tests/compiler/testdata/loop_with_numeric_enumerate...

184 lines
7.0 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: my-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": [], "my-in-coop1-2": []}'
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": "Integer"}, {"default": "1", "name": "start", "optional":
true, "type": "Integer"}, {"default": "2", "name": "end", "optional": true,
"type": "Integer"}], "name": "my-pipeline"}'
spec:
params:
- name: end
value: '2'
- name: my_pipe_param
value: '10'
- name: start
value: '1'
pipelineSpec:
params:
- name: end
default: '2'
- name: my_pipe_param
default: '10'
- name: start
default: '1'
tasks:
- name: my-pipeline-for-loop-2
params:
- name: from
value: $(params.start)
- name: my_pipe_param
value: $(params.my_pipe_param)
- name: to
value: $(params.end)
taskSpec:
apiVersion: custom.tekton.dev/v1alpha1
kind: PipelineLoop
spec:
pipelineSpec:
params:
- name: iteration-number-3
type: string
- name: loop-item-param-1
type: string
- name: my_pipe_param
type: string
tasks:
- name: my-in-coop1
params:
- name: iteration-number-3
value: $(params.iteration-number-3)
- 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:
- |
set -e
echo op1 "$0" "$1" "$2"
- $(inputs.params.iteration-number-3)
- $(inputs.params.loop-item-param-1)
- $(inputs.params.my_pipe_param)
command:
- sh
- -c
image: library/bash:4.4.23
params:
- name: iteration-number-3
type: string
- 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": "my-in-coop1",
"outputs": [], "version": "my-in-coop1@sha256=3e0e81a9e227f372f7677b8cf32c5653b7947d243bedf2762beaf556af346719"}'
tekton.dev/template: ''
timeout: 525600m
- name: my-pipeline-for-loop-5
params:
- name: from
value: '1'
- name: my_pipe_param
value: $(params.my_pipe_param)
- name: to
value: '2'
taskSpec:
apiVersion: custom.tekton.dev/v1alpha1
kind: PipelineLoop
spec:
pipelineSpec:
params:
- name: iteration-number-6
type: string
- name: loop-item-param-4
type: string
- name: my_pipe_param
type: string
tasks:
- name: my-in-coop1-2
params:
- name: iteration-number-6
value: $(params.iteration-number-6)
- name: loop-item-param-4
value: $(params.loop-item-param-4)
- name: my_pipe_param
value: $(params.my_pipe_param)
taskSpec:
steps:
- name: main
args:
- |
set -e
echo op1 "$0" "$1" "$2"
- $(inputs.params.iteration-number-6)
- $(inputs.params.loop-item-param-4)
- $(inputs.params.my_pipe_param)
command:
- sh
- -c
image: library/bash:4.4.23
params:
- name: iteration-number-6
type: string
- name: loop-item-param-4
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":
"my-in-coop1", "outputs": [], "version": "my-in-coop1@sha256=3e0e81a9e227f372f7677b8cf32c5653b7947d243bedf2762beaf556af346719"}'
tekton.dev/template: ''
timeout: 525600m
iterationNumberParam: iteration-number-6
iterateNumeric: loop-item-param-4
metadata:
labels:
pipelines.kubeflow.org/pipelinename: ''
pipelines.kubeflow.org/generation: ''
pipelines.kubeflow.org/cache_enabled: "true"
iterationNumberParam: iteration-number-3
iterateNumeric: loop-item-param-1
metadata:
labels:
pipelines.kubeflow.org/pipelinename: ''
pipelines.kubeflow.org/generation: ''
pipelines.kubeflow.org/cache_enabled: "true"
timeout: 525600m