1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/mirrors-Tekton

Клонировать/Скачать
pipelinerun-results.yaml 1.8 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
Chitrang Patel Отправлено 22.07.2024 22:01 a9b204e
apiVersion: tekton.dev/v1
kind: Task
metadata:
name: add-task
spec:
params:
- name: first
description: the first operand
- name: second
description: the second operand
results:
- name: sum
description: the sum of the first and second operand
steps:
- name: add
image: mirror.gcr.io/alpine
env:
- name: OP1
value: $(params.first)
- name: OP2
value: $(params.second)
command: ["/bin/sh", "-c"]
args:
- echo -n $((${OP1}+${OP2})) | tee $(results.sum.path);
---
apiVersion: tekton.dev/v1
kind: Pipeline
metadata:
name: sum-three-pipeline
spec:
params:
- name: first
description: the first operand
- name: second
description: the second operand
- name: third
description: the third operand
tasks:
- name: first-add
taskRef:
name: add-task
params:
- name: first
value: $(params.first)
- name: second
value: $(params.second)
- name: second-add
taskRef:
name: add-task
params:
- name: first
value: $(tasks.first-add.results.sum)
- name: second
value: $(params.third)
results:
- name: sum
description: the sum of all three operands
value: $(tasks.second-add.results.sum)
- name: partial-sum
description: the sum of first two operands
value: $(tasks.first-add.results.sum)
- name: all-sum
description: the sum of everything
value: $(tasks.second-add.results.sum)-$(tasks.first-add.results.sum)
---
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
name: sum-three-pipeline-run
spec:
pipelineRef:
name: sum-three-pipeline
params:
- name: first
value: "2"
- name: second
value: "10"
- name: third
value: "10"

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://api.gitlife.ru/oschina-mirror/mirrors-Tekton.git
git@api.gitlife.ru:oschina-mirror/mirrors-Tekton.git
oschina-mirror
mirrors-Tekton
mirrors-Tekton
main