Replies: 1 comment
-
Use the Global Workflow Variable apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: hc01-236670-
spec:
entrypoint: xyz
templates:
- name: xyz
container:
image: busybox
command: [sh, -c]
args:
- echo "Workflow name: {{workflow.name}}" # Global Workflow Variables like `{{workflow.name}}` can be
# accessed anywhere in the workflow without defining parameters. Output: Workflow name: hc01-236670-z4ssl
time="2024-12-16T14:28:05 UTC" level=info msg="sub-process exited" argo=true error="<nil>" Resources: |
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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I want to modify the workflow Template in such a way that it accesses generateName given in a workflow and applies the value to a workflow parameter. How can this be done?
Currently what I am doing is: -
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: hc01-236670-
labels:
issue: "{{workflow.name}}"
spec:
entrypoint: xyz
arguments:
parameters:
- name: issue
value: "{{workflow.name}}"
But i want to avoid even mentioning the parameter 'issue' in the workflow.
Beta Was this translation helpful? Give feedback.
All reactions