# Workflow variables catalog Auto-generated from `util/variables` via `GenerateMarkdown()`. 84 variables registered. **Skipped and omitted nodes:** when a step or task is skipped (its `when` evaluates false) or omitted (its dependencies never ran), it produces no real outputs. Its `outputs.parameters.`, `outputs.result` and `outputs.artifacts.` variables are still populated with empty placeholder values, so downstream references resolve to empty rather than leaving the workflow stuck on an unresolvable variable. A runnable [variables-showcase.yaml](https://raw.githubusercontent.com/argoproj/argo-workflows/main/examples/variables-showcase.yaml) workflow that exercises these variables is embedded at the end of this page. ## 1. Alphabetical index | Key | Kind | Type | Availability | Description | |-------------------------------------------|---------------|----------------|------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `cronworkflow.annotations` | cron-workflow | map | cron-eval | CronWorkflow annotations as a map; supports nested key access (cronworkflow.annotations.foo) | | `cronworkflow.annotations.json` | cron-workflow | json | cron-eval | CronWorkflow annotations as a JSON object | | `cronworkflow.failed` | cron-workflow | int | cron-eval | Count of failed child Workflows | | `cronworkflow.labels` | cron-workflow | map | cron-eval | CronWorkflow labels as a map; supports nested key access (cronworkflow.labels.foo) | | `cronworkflow.labels.json` | cron-workflow | json | cron-eval | CronWorkflow labels as a JSON object | | `cronworkflow.lastScheduledTime` | cron-workflow | *time.Time | cron-eval | Time the cron last triggered, or nil before the first run | | `cronworkflow.name` | cron-workflow | string | cron-eval | CronWorkflow object name | | `cronworkflow.namespace` | cron-workflow | string | cron-eval | CronWorkflow namespace | | `cronworkflow.succeeded` | cron-workflow | int | cron-eval | Count of succeeded child Workflows | | `duration` | metric | string | metric-emission | Current node's elapsed duration in seconds | | `exitCode` | metric | string | metric-emission | Current node's container exit code | | `inputs.artifacts.` | input | wfv1.Artifact | during-execute | Input artifact object (for fromExpression use) | | `inputs.artifacts..path` | input | string | during-execute | Mount path of the input artifact inside the pod | | `inputs.parameters` | input | json | during-execute | All input parameters as a JSON array | | `inputs.parameters.` | input | string | during-execute | Resolved input parameter value | | `item` | item | string or json | inside-loop | Current loop iteration value (withItems/withParam). JSON for map/list items. | | `item.` | item | string | inside-loop | Accessor into a map-typed loop iteration value | | `lastRetry.duration` | retry | string | inside-retry | Duration of the previous attempt in seconds | | `lastRetry.exitCode` | retry | string | inside-retry | Exit code of the previous attempt (or 0 on first attempt) | | `lastRetry.message` | retry | string | inside-retry | Message of the previous attempt. For a failed DAG template: `child '' failed`, naming the first failed task | | `lastRetry.status` | retry | string | inside-retry | Phase of the previous attempt (or empty on first) | | `node.name` | node-ctx | string | pre-dispatch, during-execute | Full node name | | `node.taskName` | node-ctx | string | pre-dispatch, during-execute | Name of this attempt of the node, the same as pod.name for pod-producing templates | | `outputs.artifacts..path` | output | string | during-execute | Declared output artifact path for the current template (pod side) | | `outputs.parameters.` | metric | string | metric-emission | Current node's named output parameter value (metric scope only) | | `outputs.parameters..path` | output | string | during-execute | Declared output parameter path for the current template (pod side) | | `outputs.result` | metric | string | metric-emission | Current node's captured stdout (metric scope only) | | `pod.name` | node-ctx | string | pre-dispatch, during-execute | Computed pod name for pod-producing templates | | `resourcesDuration.` | metric | string | metric-emission | Current node's resource duration in seconds, keyed by Kubernetes resource name (e.g. cpu, memory) | | `retries` | retry | string | inside-retry | 0-based retry attempt index | | `status` | metric | string | metric-emission | Current node's phase | | `steps..outputs.parameters` | node-ref | json | after-loop | JSON array of per-child output-parameter maps | | `steps..outputs.parameters.

` | node-ref | json | after-loop | JSON array of values for a named parameter across all children | | `steps..outputs.result` | node-ref | json | after-loop | JSON array of child results (withItems/withParam) | | `steps..exitCode` | node-ref | string | after-node-complete | Container exit code | | `steps..finishedAt` | node-ref | string | after-node-complete | RFC3339 finish time | | `steps..hostNodeName` | node-ref | string | after-pod-start | Underlying k8s node name | | `steps..id` | node-ref | string | after-node-init | Node ID | | `steps..ip` | node-ref | string | after-pod-start | Pod IP | | `steps..outputs.artifacts.` | node-ref | wfv1.Artifact | after-node-succeeded | Named output artifact of the referenced node | | `steps..outputs.parameters.

` | node-ref | string | after-node-succeeded | Named output parameter of the referenced node | | `steps..outputs.result` | node-ref | string | after-node-succeeded | Captured stdout (non-loop nodes) | | `steps..startedAt` | node-ref | string | after-node-init | RFC3339 start time (set at controller node-init, before pod creation; populated for all node types) | | `steps..status` | node-ref | string | after-node-init | Node phase | | `steps.name` | node-ctx | string | pre-dispatch, during-execute | Name of the current step (inside a Steps template body) | | `tasks..outputs.parameters` | node-ref | json | after-loop | JSON array of per-child output-parameter maps | | `tasks..outputs.parameters.

` | node-ref | json | after-loop | JSON array of values for a named parameter across all children | | `tasks..outputs.result` | node-ref | json | after-loop | JSON array of child results (withItems/withParam) | | `tasks..exitCode` | node-ref | string | after-node-complete | Container exit code | | `tasks..finishedAt` | node-ref | string | after-node-complete | RFC3339 finish time | | `tasks..hostNodeName` | node-ref | string | after-pod-start | Underlying k8s node name | | `tasks..id` | node-ref | string | after-node-init | Node ID | | `tasks..ip` | node-ref | string | after-pod-start | Pod IP | | `tasks..outputs.artifacts.` | node-ref | wfv1.Artifact | after-node-succeeded | Named output artifact of the referenced node | | `tasks..outputs.parameters.

` | node-ref | string | after-node-succeeded | Named output parameter of the referenced node | | `tasks..outputs.result` | node-ref | string | after-node-succeeded | Captured stdout (non-loop nodes) | | `tasks..startedAt` | node-ref | string | after-node-init | RFC3339 start time (set at controller node-init, before pod creation; populated for all node types) | | `tasks..status` | node-ref | string | after-node-init | Node phase | | `tasks.name` | node-ctx | string | pre-dispatch, during-execute | Name of the current task (inside a DAG template body) | | `workflow.annotations` | global | json | workflow-start, pre-dispatch, during-execute, exit-handler | All workflow annotations as a JSON object (deprecated — use workflow.annotations.json) | | `workflow.annotations.` | global | string | workflow-start, pre-dispatch, during-execute, exit-handler | Workflow metadata annotation value | | `workflow.annotations.json` | global | json | workflow-start, pre-dispatch, during-execute, exit-handler | All workflow annotations as a JSON object | | `workflow.creationTimestamp` | global | string | workflow-start, pre-dispatch, during-execute, exit-handler | RFC3339 creation timestamp | | `workflow.creationTimestamp.` | global | string | workflow-start, pre-dispatch, during-execute, exit-handler | strftime-formatted workflow creation time; `` is one of the chars in util/strftime | | `workflow.creationTimestamp.RFC3339` | global | string | workflow-start, pre-dispatch, during-execute, exit-handler | Workflow creation time as RFC3339 | | `workflow.creationTimestamp.s` | global | string | workflow-start, pre-dispatch, during-execute, exit-handler | Workflow creation time as Unix seconds | | `workflow.duration` | runtime | string | pre-dispatch, during-execute, exit-handler | Elapsed seconds as float string; final at exit handler | | `workflow.failures` | runtime | json | exit-handler | Failed-node descriptors. TaskGroup nodes are not listed; the failed items of an expanded step or task are. Wire format: a strconv.Quote-wrapped JSON string — consumers must JSON-decode twice. When no nodes have failed, the value is the literal 6-character string "null" (with quotes), not an empty array. | | `workflow.labels` | global | json | workflow-start, pre-dispatch, during-execute, exit-handler | All workflow labels as a JSON object (deprecated — use workflow.labels.json) | | `workflow.labels.` | global | string | workflow-start, pre-dispatch, during-execute, exit-handler | Workflow metadata label value | | `workflow.labels.json` | global | json | workflow-start, pre-dispatch, during-execute, exit-handler | All workflow labels as a JSON object | | `workflow.mainEntrypoint` | global | string | workflow-start, pre-dispatch, during-execute, exit-handler | spec.entrypoint | | `workflow.name` | global | string | workflow-start, pre-dispatch, during-execute, exit-handler | Workflow object name | | `workflow.namespace` | global | string | workflow-start, pre-dispatch, during-execute, exit-handler | Workflow namespace | | `workflow.outputs.artifacts.` | node-ref | wfv1.Artifact | during-execute, exit-handler | Global output artifact (lifted via outputs.artifacts[*].globalName). Exported when the producing node finishes; the node that finished last wins. When two nodes finish in the same second, which one wins is not defined. DAG and Steps template outputs can refer to it | | `workflow.outputs.parameters.` | node-ref | string | during-execute, exit-handler | Global output parameter (lifted via outputs.parameters[*].globalName). Exported when the producing node finishes; the node that finished last wins. When two nodes finish in the same second, which one wins is not defined. DAG and Steps template outputs can refer to it | | `workflow.parameters` | global | json | workflow-start, pre-dispatch, during-execute, exit-handler | All workflow parameters as a JSON array | | `workflow.parameters.` | global | string | workflow-start, pre-dispatch, during-execute, exit-handler | Value from spec.arguments.parameters, ConfigMap-resolved if ValueFrom is set | | `workflow.parameters.json` | global | json | workflow-start, pre-dispatch, during-execute, exit-handler | All workflow parameters as a JSON array (alias for workflow.parameters) | | `workflow.priority` | global | string | workflow-start, pre-dispatch, during-execute, exit-handler | Workflow priority. Conditional — resolves only when spec.priority is set; otherwise both lint and runtime treat the reference as undefined (no empty/zero fallback). | | `workflow.scheduledTime` | global | string | workflow-start, pre-dispatch, during-execute, exit-handler | Scheduled time for cron-triggered workflows. Conditional — resolves only when annotation `workflows.argoproj.io/scheduled-time` is present (set automatically by the cron controller). Lint passes via prefix exemption but on a non-cron Workflow the runtime leaves the literal `{{workflow.scheduledTime}}` in resolved values rather than substituting empty. | | `workflow.serviceAccountName` | global | string | workflow-start, pre-dispatch, during-execute, exit-handler | Effective service account name | | `workflow.status` | runtime | string | pre-dispatch, during-execute, exit-handler | Current workflow phase; final value only at exit handler | | `workflow.uid` | global | string | workflow-start, pre-dispatch, during-execute, exit-handler | Workflow UID | ## 2. Grouped by Kind ### Global | Key | Type | Availability | Description | |--------------------------------------|--------|------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `workflow.annotations` | json | workflow-start, pre-dispatch, during-execute, exit-handler | All workflow annotations as a JSON object (deprecated — use workflow.annotations.json) | | `workflow.annotations.` | string | workflow-start, pre-dispatch, during-execute, exit-handler | Workflow metadata annotation value | | `workflow.annotations.json` | json | workflow-start, pre-dispatch, during-execute, exit-handler | All workflow annotations as a JSON object | | `workflow.creationTimestamp` | string | workflow-start, pre-dispatch, during-execute, exit-handler | RFC3339 creation timestamp | | `workflow.creationTimestamp.` | string | workflow-start, pre-dispatch, during-execute, exit-handler | strftime-formatted workflow creation time; `` is one of the chars in util/strftime | | `workflow.creationTimestamp.RFC3339` | string | workflow-start, pre-dispatch, during-execute, exit-handler | Workflow creation time as RFC3339 | | `workflow.creationTimestamp.s` | string | workflow-start, pre-dispatch, during-execute, exit-handler | Workflow creation time as Unix seconds | | `workflow.labels` | json | workflow-start, pre-dispatch, during-execute, exit-handler | All workflow labels as a JSON object (deprecated — use workflow.labels.json) | | `workflow.labels.` | string | workflow-start, pre-dispatch, during-execute, exit-handler | Workflow metadata label value | | `workflow.labels.json` | json | workflow-start, pre-dispatch, during-execute, exit-handler | All workflow labels as a JSON object | | `workflow.mainEntrypoint` | string | workflow-start, pre-dispatch, during-execute, exit-handler | spec.entrypoint | | `workflow.name` | string | workflow-start, pre-dispatch, during-execute, exit-handler | Workflow object name | | `workflow.namespace` | string | workflow-start, pre-dispatch, during-execute, exit-handler | Workflow namespace | | `workflow.parameters` | json | workflow-start, pre-dispatch, during-execute, exit-handler | All workflow parameters as a JSON array | | `workflow.parameters.` | string | workflow-start, pre-dispatch, during-execute, exit-handler | Value from spec.arguments.parameters, ConfigMap-resolved if ValueFrom is set | | `workflow.parameters.json` | json | workflow-start, pre-dispatch, during-execute, exit-handler | All workflow parameters as a JSON array (alias for workflow.parameters) | | `workflow.priority` | string | workflow-start, pre-dispatch, during-execute, exit-handler | Workflow priority. Conditional — resolves only when spec.priority is set; otherwise both lint and runtime treat the reference as undefined (no empty/zero fallback). | | `workflow.scheduledTime` | string | workflow-start, pre-dispatch, during-execute, exit-handler | Scheduled time for cron-triggered workflows. Conditional — resolves only when annotation `workflows.argoproj.io/scheduled-time` is present (set automatically by the cron controller). Lint passes via prefix exemption but on a non-cron Workflow the runtime leaves the literal `{{workflow.scheduledTime}}` in resolved values rather than substituting empty. | | `workflow.serviceAccountName` | string | workflow-start, pre-dispatch, during-execute, exit-handler | Effective service account name | | `workflow.uid` | string | workflow-start, pre-dispatch, during-execute, exit-handler | Workflow UID | ### Runtime | Key | Type | Availability | Description | |---------------------|--------|--------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `workflow.duration` | string | pre-dispatch, during-execute, exit-handler | Elapsed seconds as float string; final at exit handler | | `workflow.failures` | json | exit-handler | Failed-node descriptors. TaskGroup nodes are not listed; the failed items of an expanded step or task are. Wire format: a strconv.Quote-wrapped JSON string — consumers must JSON-decode twice. When no nodes have failed, the value is the literal 6-character string "null" (with quotes), not an empty array. | | `workflow.status` | string | pre-dispatch, during-execute, exit-handler | Current workflow phase; final value only at exit handler | ### Input | Key | Type | Availability | Description | |--------------------------------|---------------|----------------|-------------------------------------------------| | `inputs.artifacts.` | wfv1.Artifact | during-execute | Input artifact object (for fromExpression use) | | `inputs.artifacts..path` | string | during-execute | Mount path of the input artifact inside the pod | | `inputs.parameters` | json | during-execute | All input parameters as a JSON array | | `inputs.parameters.` | string | during-execute | Resolved input parameter value | ### Output | Key | Type | Availability | Description | |----------------------------------|--------|----------------|--------------------------------------------------------------------| | `outputs.artifacts..path` | string | during-execute | Declared output artifact path for the current template (pod side) | | `outputs.parameters..path` | string | during-execute | Declared output parameter path for the current template (pod side) | ### Node-ref | Key | Type | Availability | Description | |-------------------------------------------|---------------|------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `steps..outputs.parameters` | json | after-loop | JSON array of per-child output-parameter maps | | `steps..outputs.parameters.

` | json | after-loop | JSON array of values for a named parameter across all children | | `steps..outputs.result` | json | after-loop | JSON array of child results (withItems/withParam) | | `steps..exitCode` | string | after-node-complete | Container exit code | | `steps..finishedAt` | string | after-node-complete | RFC3339 finish time | | `steps..hostNodeName` | string | after-pod-start | Underlying k8s node name | | `steps..id` | string | after-node-init | Node ID | | `steps..ip` | string | after-pod-start | Pod IP | | `steps..outputs.artifacts.` | wfv1.Artifact | after-node-succeeded | Named output artifact of the referenced node | | `steps..outputs.parameters.

` | string | after-node-succeeded | Named output parameter of the referenced node | | `steps..outputs.result` | string | after-node-succeeded | Captured stdout (non-loop nodes) | | `steps..startedAt` | string | after-node-init | RFC3339 start time (set at controller node-init, before pod creation; populated for all node types) | | `steps..status` | string | after-node-init | Node phase | | `tasks..outputs.parameters` | json | after-loop | JSON array of per-child output-parameter maps | | `tasks..outputs.parameters.

` | json | after-loop | JSON array of values for a named parameter across all children | | `tasks..outputs.result` | json | after-loop | JSON array of child results (withItems/withParam) | | `tasks..exitCode` | string | after-node-complete | Container exit code | | `tasks..finishedAt` | string | after-node-complete | RFC3339 finish time | | `tasks..hostNodeName` | string | after-pod-start | Underlying k8s node name | | `tasks..id` | string | after-node-init | Node ID | | `tasks..ip` | string | after-pod-start | Pod IP | | `tasks..outputs.artifacts.` | wfv1.Artifact | after-node-succeeded | Named output artifact of the referenced node | | `tasks..outputs.parameters.

` | string | after-node-succeeded | Named output parameter of the referenced node | | `tasks..outputs.result` | string | after-node-succeeded | Captured stdout (non-loop nodes) | | `tasks..startedAt` | string | after-node-init | RFC3339 start time (set at controller node-init, before pod creation; populated for all node types) | | `tasks..status` | string | after-node-init | Node phase | | `workflow.outputs.artifacts.` | wfv1.Artifact | during-execute, exit-handler | Global output artifact (lifted via outputs.artifacts[*].globalName). Exported when the producing node finishes; the node that finished last wins. When two nodes finish in the same second, which one wins is not defined. DAG and Steps template outputs can refer to it | | `workflow.outputs.parameters.` | string | during-execute, exit-handler | Global output parameter (lifted via outputs.parameters[*].globalName). Exported when the producing node finishes; the node that finished last wins. When two nodes finish in the same second, which one wins is not defined. DAG and Steps template outputs can refer to it | ### Item | Key | Type | Availability | Description | |--------------|----------------|--------------|------------------------------------------------------------------------------| | `item` | string or json | inside-loop | Current loop iteration value (withItems/withParam). JSON for map/list items. | | `item.` | string | inside-loop | Accessor into a map-typed loop iteration value | ### Retry | Key | Type | Availability | Description | |----------------------|--------|--------------|----------------------------------------------------------------------------------------------------------------------| | `lastRetry.duration` | string | inside-retry | Duration of the previous attempt in seconds | | `lastRetry.exitCode` | string | inside-retry | Exit code of the previous attempt (or 0 on first attempt) | | `lastRetry.message` | string | inside-retry | Message of the previous attempt. For a failed DAG template: `child '' failed`, naming the first failed task | | `lastRetry.status` | string | inside-retry | Phase of the previous attempt (or empty on first) | | `retries` | string | inside-retry | 0-based retry attempt index | ### Node-ctx | Key | Type | Availability | Description | |-----------------|--------|------------------------------|------------------------------------------------------------------------------------| | `node.name` | string | pre-dispatch, during-execute | Full node name | | `node.taskName` | string | pre-dispatch, during-execute | Name of this attempt of the node, the same as pod.name for pod-producing templates | | `pod.name` | string | pre-dispatch, during-execute | Computed pod name for pod-producing templates | | `steps.name` | string | pre-dispatch, during-execute | Name of the current step (inside a Steps template body) | | `tasks.name` | string | pre-dispatch, during-execute | Name of the current task (inside a DAG template body) | ### Metric | Key | Type | Availability | Description | |--------------------------------|--------|-----------------|---------------------------------------------------------------------------------------------------| | `duration` | string | metric-emission | Current node's elapsed duration in seconds | | `exitCode` | string | metric-emission | Current node's container exit code | | `outputs.parameters.` | string | metric-emission | Current node's named output parameter value (metric scope only) | | `outputs.result` | string | metric-emission | Current node's captured stdout (metric scope only) | | `resourcesDuration.` | string | metric-emission | Current node's resource duration in seconds, keyed by Kubernetes resource name (e.g. cpu, memory) | | `status` | string | metric-emission | Current node's phase | ### Cron-workflow | Key | Type | Availability | Description | |----------------------------------|------------|--------------|----------------------------------------------------------------------------------------------| | `cronworkflow.annotations` | map | cron-eval | CronWorkflow annotations as a map; supports nested key access (cronworkflow.annotations.foo) | | `cronworkflow.annotations.json` | json | cron-eval | CronWorkflow annotations as a JSON object | | `cronworkflow.failed` | int | cron-eval | Count of failed child Workflows | | `cronworkflow.labels` | map | cron-eval | CronWorkflow labels as a map; supports nested key access (cronworkflow.labels.foo) | | `cronworkflow.labels.json` | json | cron-eval | CronWorkflow labels as a JSON object | | `cronworkflow.lastScheduledTime` | *time.Time | cron-eval | Time the cron last triggered, or nil before the first run | | `cronworkflow.name` | string | cron-eval | CronWorkflow object name | | `cronworkflow.namespace` | string | cron-eval | CronWorkflow namespace | | `cronworkflow.succeeded` | int | cron-eval | Count of succeeded child Workflows | ## 3. Matrix by TemplateKind Which variables are in scope for each template type. `•` = in scope, blank = not in scope. | Key | any | container | container-set | script | resource | steps | dag | data | suspend | http | plugin | exit-handler | cron-workflow | |-------------------------------------------|-----|-----------|---------------|--------|----------|-------|-----|------|---------|------|--------|--------------|---------------| | `cronworkflow.annotations` | | | | | | | | | | | | | • | | `cronworkflow.annotations.json` | | | | | | | | | | | | | • | | `cronworkflow.failed` | | | | | | | | | | | | | • | | `cronworkflow.labels` | | | | | | | | | | | | | • | | `cronworkflow.labels.json` | | | | | | | | | | | | | • | | `cronworkflow.lastScheduledTime` | | | | | | | | | | | | | • | | `cronworkflow.name` | | | | | | | | | | | | | • | | `cronworkflow.namespace` | | | | | | | | | | | | | • | | `cronworkflow.succeeded` | | | | | | | | | | | | | • | | `duration` | • | • | • | • | • | • | • | • | • | • | • | • | | | `exitCode` | • | • | • | • | • | • | • | • | • | • | • | • | | | `inputs.artifacts.` | • | • | • | • | • | • | • | • | • | • | • | • | | | `inputs.artifacts..path` | | • | • | • | • | | | • | | | | • | | | `inputs.parameters` | • | • | • | • | • | • | • | • | • | • | • | • | | | `inputs.parameters.` | • | • | • | • | • | • | • | • | • | • | • | • | | | `item` | • | • | • | • | • | • | • | • | • | • | • | | | | `item.` | • | • | • | • | • | • | • | • | • | • | • | | | | `lastRetry.duration` | | • | • | • | • | • | • | • | | • | • | | | | `lastRetry.exitCode` | | • | • | • | • | • | • | • | | • | • | | | | `lastRetry.message` | | • | • | • | • | • | • | • | | • | • | | | | `lastRetry.status` | | • | • | • | • | • | • | • | | • | • | | | | `node.name` | • | • | • | • | • | • | • | • | • | • | • | • | | | `node.taskName` | | • | • | • | • | | | • | | | | • | | | `outputs.artifacts..path` | | • | • | • | • | | | • | | | | • | | | `outputs.parameters.` | • | • | • | • | • | • | • | • | • | • | • | • | | | `outputs.parameters..path` | | • | • | • | • | | | • | | | | • | | | `outputs.result` | • | • | • | • | • | • | • | • | • | • | • | • | | | `pod.name` | | • | • | • | • | | | • | | | | • | | | `resourcesDuration.` | • | • | • | • | • | • | • | • | • | • | • | • | | | `retries` | | • | • | • | • | • | • | • | | • | • | | | | `status` | • | • | • | • | • | • | • | • | • | • | • | • | | | `steps..outputs.parameters` | | | | | | • | | | | | | • | | | `steps..outputs.parameters.

` | | | | | | • | | | | | | • | | | `steps..outputs.result` | | | | | | • | | | | | | • | | | `steps..exitCode` | | | | | | • | | | | | | • | | | `steps..finishedAt` | | | | | | • | | | | | | • | | | `steps..hostNodeName` | | | | | | • | | | | | | • | | | `steps..id` | | | | | | • | | | | | | • | | | `steps..ip` | | | | | | • | | | | | | • | | | `steps..outputs.artifacts.` | | | | | | • | | | | | | • | | | `steps..outputs.parameters.

` | | | | | | • | | | | | | • | | | `steps..outputs.result` | | | | | | • | | | | | | • | | | `steps..startedAt` | | | | | | • | | | | | | • | | | `steps..status` | | | | | | • | | | | | | • | | | `steps.name` | | | | | | • | | | | | | | | | `tasks..outputs.parameters` | | | | | | | • | | | | | • | | | `tasks..outputs.parameters.

` | | | | | | | • | | | | | • | | | `tasks..outputs.result` | | | | | | | • | | | | | • | | | `tasks..exitCode` | | | | | | | • | | | | | • | | | `tasks..finishedAt` | | | | | | | • | | | | | • | | | `tasks..hostNodeName` | | | | | | | • | | | | | • | | | `tasks..id` | | | | | | | • | | | | | • | | | `tasks..ip` | | | | | | | • | | | | | • | | | `tasks..outputs.artifacts.` | | | | | | | • | | | | | • | | | `tasks..outputs.parameters.

` | | | | | | | • | | | | | • | | | `tasks..outputs.result` | | | | | | | • | | | | | • | | | `tasks..startedAt` | | | | | | | • | | | | | • | | | `tasks..status` | | | | | | | • | | | | | • | | | `tasks.name` | | | | | | | • | | | | | | | | `workflow.annotations` | • | • | • | • | • | • | • | • | • | • | • | • | | | `workflow.annotations.` | • | • | • | • | • | • | • | • | • | • | • | • | | | `workflow.annotations.json` | • | • | • | • | • | • | • | • | • | • | • | • | | | `workflow.creationTimestamp` | • | • | • | • | • | • | • | • | • | • | • | • | | | `workflow.creationTimestamp.` | • | • | • | • | • | • | • | • | • | • | • | • | | | `workflow.creationTimestamp.RFC3339` | • | • | • | • | • | • | • | • | • | • | • | • | | | `workflow.creationTimestamp.s` | • | • | • | • | • | • | • | • | • | • | • | • | | | `workflow.duration` | • | • | • | • | • | • | • | • | • | • | • | • | | | `workflow.failures` | • | | | | | | | | | | | • | | | `workflow.labels` | • | • | • | • | • | • | • | • | • | • | • | • | | | `workflow.labels.` | • | • | • | • | • | • | • | • | • | • | • | • | | | `workflow.labels.json` | • | • | • | • | • | • | • | • | • | • | • | • | | | `workflow.mainEntrypoint` | • | • | • | • | • | • | • | • | • | • | • | • | | | `workflow.name` | • | • | • | • | • | • | • | • | • | • | • | • | | | `workflow.namespace` | • | • | • | • | • | • | • | • | • | • | • | • | | | `workflow.outputs.artifacts.` | • | • | • | • | • | • | • | • | • | • | • | • | | | `workflow.outputs.parameters.` | • | • | • | • | • | • | • | • | • | • | • | • | | | `workflow.parameters` | • | • | • | • | • | • | • | • | • | • | • | • | | | `workflow.parameters.` | • | • | • | • | • | • | • | • | • | • | • | • | | | `workflow.parameters.json` | • | • | • | • | • | • | • | • | • | • | • | • | | | `workflow.priority` | • | • | • | • | • | • | • | • | • | • | • | • | | | `workflow.scheduledTime` | • | • | • | • | • | • | • | • | • | • | • | • | | | `workflow.serviceAccountName` | • | • | • | • | • | • | • | • | • | • | • | • | | | `workflow.status` | • | • | • | • | • | • | • | • | • | • | • | • | | | `workflow.uid` | • | • | • | • | • | • | • | • | • | • | • | • | | ## 4. Grouped by LifecyclePhase | Phase | Meaning | |----------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | workflow-start | Globals populated once, up front, before any template runs. | | pre-dispatch | Immediately before a template's pod is created; pod.name / node.taskName / node.name / steps.name / tasks.name are set. | | during-execute | Inside a template body; inputs.* are bound. | | inside-loop | Inside a withItems/withParam expansion; `item`, `item.` are bound. | | inside-retry | Inside a retryStrategy template; retries.* are bound. | | after-node-init | A referenced node has been initialized by the controller (id, status, startedAt are populated — startedAt is set at node-init time, before any pod is created, for all node types including non-pod ones like Suspend / HTTP / Plugin / Steps / DAG). | | after-pod-start | The referenced node's pod has started; ip, hostNodeName are populated (k8s-supplied; meaningless for non-pod node types). | | after-node-complete | The referenced node has finished (any terminal phase); finishedAt, exitCode are populated. | | after-node-succeeded | The referenced node has finished with Succeeded; outputs.result, outputs.parameters.*, outputs.artifacts.* are populated. | | after-loop | Every child of a withItems/withParam group has completed; aggregated outputs appear. | | exit-handler | The onExit template runs. workflow.{status,failures,duration} are final. Any earlier-phase variable is also visible here (scope accumulates). | | metric-emission | Inside a Prometheus metric expression. Adds duration, status, exitCode, `resourcesDuration.`, and the current node's bare outputs.result / `outputs.parameters.`. | | cron-eval | Evaluating a CronWorkflow `spec.when` or `spec.stopStrategy.expression`. Adds cronworkflow.* variables describing the cron object's identity, labels/annotations, and run counts. | ### workflow-start (20 variables) | Key | Kind | Type | |--------------------------------------|--------|--------| | `workflow.annotations` | global | json | | `workflow.annotations.` | global | string | | `workflow.annotations.json` | global | json | | `workflow.creationTimestamp` | global | string | | `workflow.creationTimestamp.` | global | string | | `workflow.creationTimestamp.RFC3339` | global | string | | `workflow.creationTimestamp.s` | global | string | | `workflow.labels` | global | json | | `workflow.labels.` | global | string | | `workflow.labels.json` | global | json | | `workflow.mainEntrypoint` | global | string | | `workflow.name` | global | string | | `workflow.namespace` | global | string | | `workflow.parameters` | global | json | | `workflow.parameters.` | global | string | | `workflow.parameters.json` | global | json | | `workflow.priority` | global | string | | `workflow.scheduledTime` | global | string | | `workflow.serviceAccountName` | global | string | | `workflow.uid` | global | string | ### pre-dispatch (27 variables) | Key | Kind | Type | |--------------------------------------|----------|--------| | `node.name` | node-ctx | string | | `node.taskName` | node-ctx | string | | `pod.name` | node-ctx | string | | `steps.name` | node-ctx | string | | `tasks.name` | node-ctx | string | | `workflow.annotations` | global | json | | `workflow.annotations.` | global | string | | `workflow.annotations.json` | global | json | | `workflow.creationTimestamp` | global | string | | `workflow.creationTimestamp.` | global | string | | `workflow.creationTimestamp.RFC3339` | global | string | | `workflow.creationTimestamp.s` | global | string | | `workflow.duration` | runtime | string | | `workflow.labels` | global | json | | `workflow.labels.` | global | string | | `workflow.labels.json` | global | json | | `workflow.mainEntrypoint` | global | string | | `workflow.name` | global | string | | `workflow.namespace` | global | string | | `workflow.parameters` | global | json | | `workflow.parameters.` | global | string | | `workflow.parameters.json` | global | json | | `workflow.priority` | global | string | | `workflow.scheduledTime` | global | string | | `workflow.serviceAccountName` | global | string | | `workflow.status` | runtime | string | | `workflow.uid` | global | string | ### during-execute (35 variables) | Key | Kind | Type | |--------------------------------------|----------|---------------| | `inputs.artifacts.` | input | wfv1.Artifact | | `inputs.artifacts..path` | input | string | | `inputs.parameters` | input | json | | `inputs.parameters.` | input | string | | `node.name` | node-ctx | string | | `node.taskName` | node-ctx | string | | `outputs.artifacts..path` | output | string | | `outputs.parameters..path` | output | string | | `pod.name` | node-ctx | string | | `steps.name` | node-ctx | string | | `tasks.name` | node-ctx | string | | `workflow.annotations` | global | json | | `workflow.annotations.` | global | string | | `workflow.annotations.json` | global | json | | `workflow.creationTimestamp` | global | string | | `workflow.creationTimestamp.` | global | string | | `workflow.creationTimestamp.RFC3339` | global | string | | `workflow.creationTimestamp.s` | global | string | | `workflow.duration` | runtime | string | | `workflow.labels` | global | json | | `workflow.labels.` | global | string | | `workflow.labels.json` | global | json | | `workflow.mainEntrypoint` | global | string | | `workflow.name` | global | string | | `workflow.namespace` | global | string | | `workflow.outputs.artifacts.` | node-ref | wfv1.Artifact | | `workflow.outputs.parameters.` | node-ref | string | | `workflow.parameters` | global | json | | `workflow.parameters.` | global | string | | `workflow.parameters.json` | global | json | | `workflow.priority` | global | string | | `workflow.scheduledTime` | global | string | | `workflow.serviceAccountName` | global | string | | `workflow.status` | runtime | string | | `workflow.uid` | global | string | ### inside-loop (2 variables) | Key | Kind | Type | |--------------|------|----------------| | `item` | item | string or json | | `item.` | item | string | ### inside-retry (5 variables) | Key | Kind | Type | |----------------------|-------|--------| | `lastRetry.duration` | retry | string | | `lastRetry.exitCode` | retry | string | | `lastRetry.message` | retry | string | | `lastRetry.status` | retry | string | | `retries` | retry | string | ### after-node-init (6 variables) | Key | Kind | Type | |--------------------------|----------|--------| | `steps..id` | node-ref | string | | `steps..startedAt` | node-ref | string | | `steps..status` | node-ref | string | | `tasks..id` | node-ref | string | | `tasks..startedAt` | node-ref | string | | `tasks..status` | node-ref | string | ### after-pod-start (4 variables) | Key | Kind | Type | |-----------------------------|----------|--------| | `steps..hostNodeName` | node-ref | string | | `steps..ip` | node-ref | string | | `tasks..hostNodeName` | node-ref | string | | `tasks..ip` | node-ref | string | ### after-node-complete (4 variables) | Key | Kind | Type | |---------------------------|----------|--------| | `steps..exitCode` | node-ref | string | | `steps..finishedAt` | node-ref | string | | `tasks..exitCode` | node-ref | string | | `tasks..finishedAt` | node-ref | string | ### after-node-succeeded (6 variables) | Key | Kind | Type | |---------------------------------------|----------|---------------| | `steps..outputs.artifacts.` | node-ref | wfv1.Artifact | | `steps..outputs.parameters.

` | node-ref | string | | `steps..outputs.result` | node-ref | string | | `tasks..outputs.artifacts.` | node-ref | wfv1.Artifact | | `tasks..outputs.parameters.

` | node-ref | string | | `tasks..outputs.result` | node-ref | string | ### after-loop (6 variables) | Key | Kind | Type | |-------------------------------------------|----------|------| | `steps..outputs.parameters` | node-ref | json | | `steps..outputs.parameters.

` | node-ref | json | | `steps..outputs.result` | node-ref | json | | `tasks..outputs.parameters` | node-ref | json | | `tasks..outputs.parameters.

` | node-ref | json | | `tasks..outputs.result` | node-ref | json | ### exit-handler (56 variables) | Key | Kind | Type | |-------------------------------------------|----------|---------------| | `inputs.artifacts..path` | input | string | | `node.taskName` | node-ctx | string | | `outputs.artifacts..path` | output | string | | `outputs.parameters..path` | output | string | | `pod.name` | node-ctx | string | | `steps..outputs.parameters` | node-ref | json | | `steps..outputs.parameters.

` | node-ref | json | | `steps..outputs.result` | node-ref | json | | `steps..exitCode` | node-ref | string | | `steps..finishedAt` | node-ref | string | | `steps..hostNodeName` | node-ref | string | | `steps..id` | node-ref | string | | `steps..ip` | node-ref | string | | `steps..outputs.artifacts.` | node-ref | wfv1.Artifact | | `steps..outputs.parameters.

` | node-ref | string | | `steps..outputs.result` | node-ref | string | | `steps..startedAt` | node-ref | string | | `steps..status` | node-ref | string | | `tasks..outputs.parameters` | node-ref | json | | `tasks..outputs.parameters.

` | node-ref | json | | `tasks..outputs.result` | node-ref | json | | `tasks..exitCode` | node-ref | string | | `tasks..finishedAt` | node-ref | string | | `tasks..hostNodeName` | node-ref | string | | `tasks..id` | node-ref | string | | `tasks..ip` | node-ref | string | | `tasks..outputs.artifacts.` | node-ref | wfv1.Artifact | | `tasks..outputs.parameters.

` | node-ref | string | | `tasks..outputs.result` | node-ref | string | | `tasks..startedAt` | node-ref | string | | `tasks..status` | node-ref | string | | `workflow.annotations` | global | json | | `workflow.annotations.` | global | string | | `workflow.annotations.json` | global | json | | `workflow.creationTimestamp` | global | string | | `workflow.creationTimestamp.` | global | string | | `workflow.creationTimestamp.RFC3339` | global | string | | `workflow.creationTimestamp.s` | global | string | | `workflow.duration` | runtime | string | | `workflow.failures` | runtime | json | | `workflow.labels` | global | json | | `workflow.labels.` | global | string | | `workflow.labels.json` | global | json | | `workflow.mainEntrypoint` | global | string | | `workflow.name` | global | string | | `workflow.namespace` | global | string | | `workflow.outputs.artifacts.` | node-ref | wfv1.Artifact | | `workflow.outputs.parameters.` | node-ref | string | | `workflow.parameters` | global | json | | `workflow.parameters.` | global | string | | `workflow.parameters.json` | global | json | | `workflow.priority` | global | string | | `workflow.scheduledTime` | global | string | | `workflow.serviceAccountName` | global | string | | `workflow.status` | runtime | string | | `workflow.uid` | global | string | ### metric-emission (6 variables) | Key | Kind | Type | |--------------------------------|--------|--------| | `duration` | metric | string | | `exitCode` | metric | string | | `outputs.parameters.` | metric | string | | `outputs.result` | metric | string | | `resourcesDuration.` | metric | string | | `status` | metric | string | ### cron-eval (9 variables) | Key | Kind | Type | |----------------------------------|---------------|------------| | `cronworkflow.annotations` | cron-workflow | map | | `cronworkflow.annotations.json` | cron-workflow | json | | `cronworkflow.failed` | cron-workflow | int | | `cronworkflow.labels` | cron-workflow | map | | `cronworkflow.labels.json` | cron-workflow | json | | `cronworkflow.lastScheduledTime` | cron-workflow | *time.Time | | `cronworkflow.name` | cron-workflow | string | | `cronworkflow.namespace` | cron-workflow | string | | `cronworkflow.succeeded` | cron-workflow | int | ## 5. Showcase workflow The runnable example below exercises the variables catalogued above. It is embedded at docs-build time from `examples/variables-showcase.yaml` (the same file the example tests validate and run). ```yaml title="examples/variables-showcase.yaml" --8<-- "examples/variables-showcase.yaml" ```