View build-env-propagator on the plugin site for more information.
This plugin lets you add new build environment variables, override a pre-defined and existing variables at each build
step. Set of variables defined at a build step is carried over to the sub-sequent build steps. Any subsequent build step
can override any variable defined by the previous build step.
Click on Build->Add Build Step->Propagate build environment variables, and then enter environment variables (key value pairs) to be accessible in your next build step. You can also override previously define environment variable key, this includes Jenkins defined build environment keys as well.
Any successive Propagate build environment variables step will override previously defined environment variable values.
You can also add environment variable using Jenkins CLI: