Generating environment variables for Pipelines - Unified Agent
The Unified Agent documentation mentions that all parameters are available as environment variables by using a given syntax as shown here:
Configuring the Unified Agent by Environment Variables
Since the exact variable name is not provided for all available parameters, you may use the following Bash commands in order to generate them (Linux):
#!/bin/bash
config_parameter='scm.npmInstallTimeoutMinutes';
config_parameter_env_name=$(echo "WS_${config_parameter^^}"| sed 's|\.|_|g');
echo $config_parameter_env_name
Or the following script in MacOS:
#!/bin/zsh
config_parameter='scm.npmInstallTimeoutMinutes';
config_parameter_env_name=$(echo "WS_$config_parameter"| sed 's|\.|_|g');
echo ${config_parameter_env_name:u}
The results are as follows:
❯ config_parameter='scm.npmInstallTimeoutMinutes';config_parameter_env_name=$(echo "WS_${config_parameter^^}"| sed 's|\.|_|g');echo $config_parameter_env_name
WS_SCM_NPMINSTALLTIMEOUTMINUTES