Replies: 1 comment
-
You may use metadata:
name: demo
namespace: argo
spec:
arguments:
parameters:
- name: metaData
value: |
{
"basic": {
"serverEnv": "pre"
}
}
entrypoint: main
templates:
- name: main
steps:
- - name: argosay
template: argosay
when: "{{=fromJSON(workflow.parameters.metaData).basic?.env == nil}}"
- name: argosay
container:
name: main
image: argoproj/argosay:v2
command: [/argosay]
args: [echo, hello] |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
How can I check if the iid field exists in the
mrInfo
object (which may or may not have this field) using the when statement? I tried using the?
operator, but it still throws an error.when: "{{=jsonpath(workflow.parameters.metaData, '$.mrInfo?.iid') == nil }}"
Beta Was this translation helpful? Give feedback.
All reactions