Use UDS Runner
What you’ll accomplish
Section titled “What you’ll accomplish”UDS CLI ships with a vendored build of maru-runner called UDS Runner. By the end of this guide you’ll know how to:
- Run tasks from a
tasks.yaml - Set task variables via environment variables
- Invoke
udsandzarfcommands from within tasks - Use the built-in
UDS_ARCHvariable
Prerequisites
Section titled “Prerequisites”-
Create a
tasks.yamltasks.yaml tasks:- name: echo-hellodescription: "Print a greeting"actions:- cmd: echo "Hello from UDS Runner" -
Run a task
Terminal window uds run echo-helloTo run a task from a specific file (not the default
tasks.yaml):Terminal window uds run -f path/to/other-tasks.yaml my-task -
Use variables
Define variables with defaults and override them at runtime:
tasks.yaml variables:- name: FOOdefault: footasks:- name: echo-fooactions:- cmd: echo ${FOO}Override via environment variable (prefix with
UDS_):Terminal window UDS_FOO=bar uds run echo-foo# prints: bar -
Run UDS and Zarf commands from tasks
Use
./udsto call your system UDS binary and./zarfto call the vendored Zarf binary:tasks.yaml tasks:- name: inspect-and-checkactions:- cmd: ./uds inspect k3d-core-istio-dev:0.16.1- cmd: ./zarf tools kubectl get pods -A -
Use the architecture variable
UDS_ARCHis automatically set to your system architecture and is available inside any task:tasks.yaml tasks:- name: print-archactions:- cmd: echo ${UDS_ARCH}Terminal window uds run print-arch# prints: amd64 (or arm64)UDS_ARCHITECTURE=amd64 uds run print-arch# prints: amd64 -
Organize tasks with includes
Break large task sets across multiple files using
includes:tasks.yaml includes:- test: tasks/tests.yaml- build: tasks/build.yamltasks:- name: full-ciactions:- task: build:build-all- task: test:run-all
Verification
Section titled “Verification”List tasks defined in your tasks.yaml:
uds run --list # tasks in the current fileuds run --list-all # tasks in the current file and all included filesTroubleshooting
Section titled “Troubleshooting”Problem: Task not found
Section titled “Problem: Task not found”Symptom: task not found error when running uds run <task-name>.
Solution: Verify the task name matches exactly; task names are case-sensitive.
Problem: Variable not applied
Section titled “Problem: Variable not applied”Symptom: A task variable retains its default value despite setting an environment variable.
Solution: Confirm the environment variable uses the UDS_ prefix (e.g., UDS_FOO=bar).
Problem: ./zarf command not found
Section titled “Problem: ./zarf command not found”Symptom: A task using ./zarf fails with a “command not found” error.
Solution: Ensure you are using ./zarf, not bare zarf; the vendored binary requires the ./ prefix.
Problem: Wrong architecture detected
Section titled “Problem: Wrong architecture detected”Symptom: UDS_ARCH resolves to an unexpected value.
Solution: Override with UDS_ARCHITECTURE=amd64 (or arm64) before running the task.
Related Documentation
Section titled “Related Documentation”- Monitor a Cluster: Stream real-time Pepr admission and operator logs.
- Use Bundle Overrides: Customize deployments at runtime with Helm overrides and variables.