This topic is not relevant if you are running LGTM Enterprise on Kubernetes.
The cluster configuration file allows you to define environment variables for your worker host machines.
It's common practice when setting an environment variable to use environment variables within the values you set. However, in the LGTM cluster configuration file you can only do this when defining environment variables for Windows worker hosts.
Linux worker hosts
Environment variables are not supported within the values of any setting in the cluster configuration file.
Windows worker hosts
You can use Windows environment variables within the values of settings in the
environment property of the cluster configuration file. You should, however, note the following:
- Variable interpolation happens on the worker host machine. Therefore the value of an environment variable may not be the same on each machine. It may not be safe to assume that, for example, a particular path is included in the value of an environment variable on all of your Windows worker hosts.
- If the environment variable you reference is not set on a machine, the literal string (for example, "
%EXAMPLE_PATH%") will be used, which is likely to cause an error.
For an example of an environment variable being referenced in a cluster configuration file, see lgtm-cluster-config.yml file.