Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add note about UDS_ARCH #652

Merged
merged 6 commits into from
Jun 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions docs/runner.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,26 @@ tasks:
- cmd: echo ${FOO}
```

### Running UDS and Zarf Commands
To run `uds` commands from within a task, you can invoke your system `uds` binary using the `./uds` syntax. Similarly, UDS CLI vendors Zarf, and tasks can run vendored Zarf commands using `./zarf`. For example:
```yaml
tasks:
- name: default
actions:
- cmd: ./uds inspect k3d-core-istio-dev:0.16.1 # uses system uds
- cmd: ./zarf tools kubectl get pods -A # uses vendored Zarf
```

### Architecture Environment Variable
When running tasks with `uds run`, there is a special `UDS_ARCH` environment variable accessible within tasks that is automatically set to your system architecture, but is also configurable with a `UDS_ARCHITECTURE` environmental variable. For example:
```
tasks:
- name: print-arch
actions:
- cmd: echo ${UDS_ARCH}
```
- Running `uds run print-arch` will echo your local system architecture
- Running `UDS_ARCHITECTURE=amd64 uds run print-arch` will echo "amd64"

### No Dependency on Zarf
Since UDS CLI also vendors [Zarf](https://github.com/defenseunicorns/zarf), there is no need to also have Zarf installed on your system.
Loading