Get a list of task names #12715
Unanswered
HendrikSchrieber
asked this question in
Q&A
Replies: 1 comment
-
Currently, Argo Workflows does not provide a built-in way to list all task names in a workflow dynamically from within the workflow itself. Workflow variables such as https://argo-workflows.readthedocs.io/en/latest/variables/#dag-templates However, you could extract DAG task names using kubectl get workflow <workflow-name> -o json | jq -r '.spec.templates[] | select(.dag.tasks) | .dag.tasks[].name' Example Output If your Workflow contains tasks like task-1, task-2, and task-3, the above commands will return: task-1
task-2
task-3 References |
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.
-
Hey everybody,
is it possible to somehow get a list of the names of all tasks of a workflow from within that workflow? I know that I can get certain information using workflow variables but those only get me the name of a single task - the one that is currently being executed. I need a list of all tasks names so I can pass it to an external CI system (e.g. GitLab) and sync the pipeline status.
Thanks!
Hendrik
Beta Was this translation helpful? Give feedback.
All reactions