Skip to main content
Skip table of contents

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):

CODE
#!/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:

NONE
#!/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:

CODE
❯ config_parameter='scm.npmInstallTimeoutMinutes';config_parameter_env_name=$(echo "WS_${config_parameter^^}"| sed 's|\.|_|g');echo $config_parameter_env_name
WS_SCM_NPMINSTALLTIMEOUTMINUTES

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.