From 86b136938d0b0e3835979da70feda40da7da83a4 Mon Sep 17 00:00:00 2001 From: Isaac Mann Date: Mon, 12 Feb 2024 15:41:45 -0500 Subject: [PATCH] docs(core): env-vars in launch template (#21757) --- docs/nx-cloud/reference/launch-templates.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/docs/nx-cloud/reference/launch-templates.md b/docs/nx-cloud/reference/launch-templates.md index f4eadd79d2..34813acdd5 100644 --- a/docs/nx-cloud/reference/launch-templates.md +++ b/docs/nx-cloud/reference/launch-templates.md @@ -69,6 +69,20 @@ _Note: Windows-based images can only run on Windows-based resource classes._ Enterprise accounts can use custom images. +## Pass Environment Variables to Agents + +If you need to send environment variables to agents, you can use the [--with-env-vars](/ci/reference/nx-cloud-cli#withenvvars) flag on the `nx-cloud start-ci-run` command. You can pass a specific list of environment variables like this: + +``` +nx-cloud start-ci-run --distribute-on="8 linux-medium-js" --with-env-vars="VAR1,VAR2" +``` + +Or pass all the environment variables except OS-specific ones with this `--with-env-vars="auto"`: + +``` +nx-cloud start-ci-run --distribute-on="8 linux-medium-js" --with-env-vars="auto" +``` + ## Reusable Steps -You can find the list of reusable step [here](https://github.com/nrwl/nx-cloud-workflows/tree/main/workflow-steps). +You can find the [list of reusable steps here](https://github.com/nrwl/nx-cloud-workflows/tree/main/workflow-steps).