EnvInject Usage

2012-04-05 Thread shanz
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!


Re: EnvInject Usage

2012-04-05 Thread Grégory Boissinot
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 duncan.perr...@gmail.com 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!


Re: EnvInject Usage

2012-04-05 Thread shanz
Fair enough but I think it is all very confusing particularly the
Properties File Path and Properties Content fields.
Are these mutually exclusive?
I think it is very unintuitive.

In the wiki page it says, Variables Traceability - Each build
captures environment variables and stores them in an environment file
called 'injectedEnvVars.txt' located in
$JENKINS_HOME/jobsyour_job/builds/your_build



On Apr 5, 12:14 pm, Grégory Boissinot gregory.boissi...@gmail.com
wrote:
 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 duncan.perr...@gmail.com 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!


Re: EnvInject Usage

2012-04-05 Thread Grégory Boissinot
On Thu, Apr 5, 2012 at 1:38 PM, shanz duncan.perr...@gmail.com wrote:

 Fair enough but I think it is all very confusing particularly the
 Properties File Path and Properties Content fields.


No, Jenkins enables you to inject your own environment variables by
properties.

 Are these mutually exclusive?

Yes

 I think it is very unintuitive.

 In the wiki page it says, Variables Traceability - Each build
 captures environment variables and stores them in an environment file
 called 'injectedEnvVars.txt' located in
 $JENKINS_HOME/jobsyour_job/builds/your_build

 Yes, You can get environment variables used for a build.
You can also get them through an URL.



 On Apr 5, 12:14 pm, Grégory Boissinot gregory.boissi...@gmail.com
 wrote:
  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 duncan.perr...@gmail.com 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!


Re: EnvInject Usage

2012-04-05 Thread hsn_
anybody made envinject to work on jboss 7.1?


Re: EnvInject Usage

2012-04-05 Thread Grégory Boissinot
What is the issue?

On Thu, Apr 5, 2012 at 5:37 PM, hsn_ kolar.ra...@gmail.com wrote:

 anybody made envinject to work on jboss 7.1?