-
Trying to pass output of a step to another step input using outputs.parameters, however, the workflow is returning the literal text instead of actual value. Result from the logs http-output-parameters-fbmcb-print-message-2963366455: Received message: {{steps.get.outputs.parameters.result}} Workflow used
Output parameter doc doesn't have details about the same. Can somebody help to find out what could be the issue with the template? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
It looks like there's a bug with HTTP templates where the apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: http-output-parameters-
spec:
entrypoint: main
templates:
- name: main
steps:
- - name: get
template: http-get
- - name: print
template: print-message
arguments:
parameters:
- name: message
value: "{{=jsonpath(steps.get.outputs.result, '$.origin')}}"
- name: url
value: "{{=jsonpath(steps.get.outputs.result, '$.url')}}"
- name: http-get
http:
url: https://httpbin.org/get
- name: print-message
inputs:
parameters:
- name: message
- name: url
script:
image: alpine:3.7
command: [sh, -c]
source: |
echo "Received message: {{inputs.parameters.message}}"
echo "URL: {{inputs.parameters.url}}" |
Beta Was this translation helpful? Give feedback.
It looks like there's a bug with HTTP templates where the
outputs:
always get overridden withresult
, but you can workaround that by extracting the data fromresult
: