How to set environment variables in Jenkins?
This can be done via EnvInject plugin in the following way:
Create an "Execute shell" build step that runs:
echo AOEU=$(echo aoeu) > propsfile
Create an Inject environment variables build step and set "Properties File Path" to
propsfile
.
Note: This plugin is (mostly) not compatible with the Pipeline plugin.
The simplest way
You can use EnvInject plugin to injects environment variables at build startup. For example: