You can configure an agent environment variable with a CloudBees CD/RO server-side property instead of in the agent’s
agent/wrapper.conf file. These properties can be created under
resource pool objects in the custom
ec_environment_variables property sheet.
ec_environment_variables property sheet does not exist, it must be created under
resource pool objects.
Environment variables defined in
wrapper.confare defined for both the process environment of step commands run by the agent and for the agent process itself.
If a particular environment variable is defined in both
wrapper.confand on the
ec_environment_variablesproperty sheet, then the agent process itself sees the value defined in
wrapper.confand step commands see the value defined in the property sheet.
The following order applies to environment variables:
Environment variables defined on the resource level have the highest priority and may overwrite any others because they are the last to be applied.
Agent environment variables can be centrally managed by the CloudBees CD/RO server.
Environment variables can be set at the zone level for all resources from this zone or at the resource level for individual agents. The settings at the resource level take precedent over the settings at the zone level.
Agent restart is not required for the new
ec_environment_variablesproperty sheet settings to take effect, which is required when applying the changes in the
Two or more resources can be created based on the same agent by defining different environment variables. You can then use them independently by the executed job steps on the agent.
As a best practice, use the
ec_environment_variables approach rather than the
wrapper.conf approach to avoid introducing environment variables into the agent process itself and to avoid having to edit files on the agent and restart the agent, as noted.
For more information about properties, refer to Properties.
For example, a customer has machine
agent-b installed with one CloudBees CD/RO agent that has access to the public internet via proxy, only. To specify programs such as
wget to use a proxy, set special environment variables as a property under the appropriate CloudBees CD/RO server
HTTP proxy for all agents in the same zone,
HTTPS proxy for an individual resource,