I have two scripts in the pre-build step in a Jenkins job, the first one a perl script, the second a system groovy script using the groovy plugin. I need information from th
The way to propagate environment variables among build steps is via EnvInject Plugin.
Here are some previous answers that show how to do it:
In your case, however, it may be simpler just to write to a file in one build step and read that file in another. To make sure you do not accidentally read from a previous version of the file you can incorporate BUILD_ID
in the file name.