引用前一步的输出失败-为什么?



我想引用前一步的输出。但是由于某些原因,我得到了一个错误:

2021/03/09 16:39:35 Failed to create workflow template: templates.main.steps[1].s2 templates.s2-tmp: failed to resolve {{steps.s1.outputs.parameters.param}}

apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
name: test-wf
namespace: argo
spec:
entrypoint: main
templates:
- name: s1-tmp
script:
image: alpine:latest
command: [sh]
source: |
echo "s1-tmp"
outputs:
parameters:
- name: param
value: "param-value"
- name: s2-tmp
container:
image: alpine:latest
command: [echo, "{{steps.s1.outputs.parameters.param}}"]
- name: main
steps:
- - name: s1
template: s1-tmp
- - name: s2
template: s2-tmp

任何想法?

总的来说,设置工作。如果我在步骤2中回显一个静态字符串,那么Wf就会成功执行——步骤1和步骤2都会回显。但是我不能引用前一步的输出:/

apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
name: test-wf
namespace: argo
spec:
entrypoint: main
templates:
- name: s1-tmp
script:
image: alpine:latest
command: [sh]
source: |
echo "s1-tmp"
outputs:
parameters:
- name: param
value: "param-value"
- name: s2-tmp
inputs:
parameters:
- name: param
container:
image: alpine:latest
command: [echo, "{{inputs.parameters.param}}"]
- name: main
steps:
- - name: s1
template: s1-tmp
- - name: s2
template: s2-tmp
arguments:
parameters:
- name: param
value: "{{steps.s1.outputs.parameters.param}}"

相关内容

  • 没有找到相关文章

最新更新