-
Hi guys, I have been having some issues getting my workflow, being triggered by argo-events, to run when my worflow.parameters has a "-" in it. Here is the original code in question - name: build-image-push
dependencies: [clone-repo]
when: "{{workflow.parameters.repo_name}} == games-api-example"
templateRef:
name: clone-build-push
template: build-image-from-repo
clusterScope: true I came across this issue #3611 and updated my code to this - name: build-image-push
dependencies: [clone-repo]
when: "{{workflow.parameters.repo_name}} == \"games-api-example\""
templateRef:
name: clone-build-push
template: build-image-from-repo
clusterScope: true but it also does not seem to work either. when I check the workflow logs, I find this error.
I am not exactly sure what I am doing wrong. I hope someone can give me some guidance |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
I'm wondering if anyone can help with this. I am still having issues. I have tried various ways of escaping the dashes/hypens with no success. Some of what I've tried include
nothing seems to work. I am not sure what I am missing? |
Beta Was this translation helpful? Give feedback.
Have you tried embedding an
expr
expression as suggested at the bottom of the Conditionals page?i.e.
when: "{{=workflow.parameters.repo_name == 'games-api-example'}}"
Note that
govaluate
is on the way out per #7831, but has been deferred for a bit as it would be a breaking change