From db78766e0892f45fc04c72d2e4a33e8932f2e8d2 Mon Sep 17 00:00:00 2001 From: UncleGedd <42304551+UncleGedd@users.noreply.github.com> Date: Mon, 3 Jun 2024 11:11:28 -0500 Subject: [PATCH 1/6] docs: add note about UDS_ARCH --- docs/runner.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/runner.md b/docs/runner.md index 5eb6035d..0bcbbc51 100644 --- a/docs/runner.md +++ b/docs/runner.md @@ -34,5 +34,16 @@ tasks: - cmd: echo ${FOO} ``` +### 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-local 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. From f10431adad23f76dbeffb9ab098698b9b1739db4 Mon Sep 17 00:00:00 2001 From: UncleGedd <42304551+UncleGedd@users.noreply.github.com> Date: Mon, 3 Jun 2024 11:15:00 -0500 Subject: [PATCH 2/6] Update docs/runner.md --- docs/runner.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/runner.md b/docs/runner.md index 0bcbbc51..87b6975a 100644 --- a/docs/runner.md +++ b/docs/runner.md @@ -43,7 +43,7 @@ tasks: - cmd: echo ${UDS_ARCH} ``` - Running `uds run print-arch` will echo your local system architecture -- Running `UDS_ARCHITECTURE=amd64 uds-local run print-arch` will echo "amd64" +- 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. From 11f2cdcdf07dcf7cc8753782634068d4e4178293 Mon Sep 17 00:00:00 2001 From: unclegedd Date: Mon, 3 Jun 2024 11:22:06 -0500 Subject: [PATCH 3/6] lint me From 0174ffdadb4014e3fd5a685b33b9c0cee87621b4 Mon Sep 17 00:00:00 2001 From: unclegedd Date: Mon, 3 Jun 2024 11:23:34 -0500 Subject: [PATCH 4/6] lint me --- docs/runner.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/runner.md b/docs/runner.md index 87b6975a..c5b1804d 100644 --- a/docs/runner.md +++ b/docs/runner.md @@ -43,7 +43,7 @@ tasks: - 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" +- 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. From ac4b54f2639c8b1324b4a6d8e1c168c8ca3ba8d6 Mon Sep 17 00:00:00 2001 From: unclegedd Date: Mon, 3 Jun 2024 12:30:48 -0500 Subject: [PATCH 5/6] more docs --- docs/runner.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/runner.md b/docs/runner.md index c5b1804d..257a3daf 100644 --- a/docs/runner.md +++ b/docs/runner.md @@ -34,6 +34,16 @@ 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: ``` @@ -46,4 +56,4 @@ tasks: - 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. +Since UDS CLI also vendors [Zarf](), there is no need to also have Zarf installed on your system. From ca578b4876ef6e562741b0798cbb3790248b9daa Mon Sep 17 00:00:00 2001 From: unclegedd Date: Mon, 3 Jun 2024 13:00:04 -0500 Subject: [PATCH 6/6] adds Zarf link back --- docs/runner.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/runner.md b/docs/runner.md index 257a3daf..db641c26 100644 --- a/docs/runner.md +++ b/docs/runner.md @@ -56,4 +56,4 @@ tasks: - Running `UDS_ARCHITECTURE=amd64 uds run print-arch` will echo "amd64" ### No Dependency on Zarf -Since UDS CLI also vendors [Zarf](), there is no need to also have Zarf installed on your system. +Since UDS CLI also vendors [Zarf](https://github.com/defenseunicorns/zarf), there is no need to also have Zarf installed on your system.