EnvInject plugin enables you to inject only variables for a build. It is not aimed at propagating environment variables to downstream jobs. Therefore, EnvInject plugin can read files (properties files) and it doesn't create files. If you want to share elements, you have to do yourself.
On Thu, Apr 5, 2012 at 12:04 PM, shanz <[email protected]> wrote: > Environment variables in jenkins are driving me up the wall! > > I want to create a "formatted version number", called say BUILD_DATE. > Then I want to store this date in an environment variable that > subsequent jobs can retrieve. > > I know I can write it into a file manually but surely the EnvInject > plugin should be able to do this? > > If I tick "Inject environment variables to the build process", then I > can enter the path to a file, eg: > C:\jenkins\jobs\EnvInjStuff\envInjDate.properties > > I seem to have to create this empty file manually for jenkins to be > happy. > > I can also fill in the Properties Content but this never appears in > the file. > Subsequently, later jobs can't retrieve data from the file. > > Please help me before I go completely mad!
