-
spec:
arguments:
parameters:
- name: metaData
value: |
{
"basic": {
"serverEnv": "pre"
},
"repoInfo": {
"branch": "release/new-feature"
},
"mrInfo": {
"title": "title",
"mrLabels": []
}
} How can I check if the iid field exists in the
|
Beta Was this translation helpful? Give feedback.
Answered by
jswxstw
Oct 10, 2024
Replies: 1 comment 1 reply
-
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.
1 reply
Answer selected by
mio4kon
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You may use
fromJSON
instead, here is an example: