Environment Variables
NX_BRANCH- The@nrwl/nx-cloudrequires theNX_BRANCHenvironment variables to be set. For many CI providers (e.g., GitHub Actions), the runner is able to set it automatically. For others, the variable will have to be set manually. If you set it manually, note thatNX_BRANCHhas to be set to a PR number for the GitHub integration to work.NX_CLOUD_ACCESS_TOKEN- You can also configure the access token by setting theNX_CLOUD_ACCESS_TOKENenvironment variable.NX_CLOUD_ACCESS_TOKENtakes precedence over the accessToken property. It's common to have a read-only token stored innx.jsonand a read-write token set viaNX_CLOUD_ACCESS_TOKENin CI.NX_CLOUD_DISTRIBUTED_EXECUTION_AGENT_COUNT- SettingNX_CLOUD_DISTRIBUTED_EXECUTION_AGENT_COUNTto say 8 will tell Nx Cloud assume that there are 8 agents running.NX_CLOUD_DISTRIBUTED_EXECUTION_STOP_AGENTS_ON_FAILURE- SettingNX_CLOUD_DISTRIBUTED_EXECUTION_STOP_AGENTS_ON_FAILUREto true will tell Nx Cloud not to stop agents if a command fails. You need to make sure to invoke nx-cloud stop-all-agents even if CI fails.NX_CLOUD_DISTRIBUTED_EXECUTION- SettingNX_CLOUD_DISTRIBUTED_EXECUTIONto true enables distributed task execution.NX_CLOUD_ENCRYPTION_KEY- You can set theencryptionKeyproperty innx.jsonor set theNX_CLOUD_ENCRYPTION_KEYenvironment variable to enable the e2e encryption of your artifacts. In this case, the artifacts will be encrypted/encrypted on your machine.NX_CLOUD_ENV_NAME- SettingNX_CLOUD_ENV_NAMEwill prefix all your commands so you can easily distinguish them in the UI and in GitHub comments. For instance, if you run the same set of commands on Windows and Linux machines, you can setNX_CLOUD_ENV_NAMEto win on the Windows agent, and linux on Linux agents.NX_CLOUD_NO_TIMEOUTS- By default, Nx Cloud requests will time out after 10 seconds.NX_CLOUD_NO_TIMEOUTSdisables the timeout.NX_VERBOSE_LOGGING- SettingNX_VERBOSE_LOGGINGto true will output the debug information about agents communicating with the main job. This can be useful for debugging unexpected cache misses, and issues with Nx Private Cloud setups.