Re: Access BUILD_CAUSE and BUILD_CAUSE_USERIDCAUSE through Build Flow DSL

2015-11-02 Thread Stefan Thomasson
Hi, And as always with buildflow, make sure that the "use workspace" is enabled in the job configuration. Since the environment variable seem to be created by envinject plugin. //stefan > 1 nov 2015 kl. 13:21 skrev GS_L : > > The problem is that the EnvInject isn't enabled through the BuildFlo

Re: Access BUILD_CAUSE and BUILD_CAUSE_USERIDCAUSE through Build Flow DSL

2015-11-02 Thread Stefan Thomasson
Hi, Doesn't this work? build.environment["BUILD_CAUSE"] Atleast this works for me for manually started builds. However it will not get the real cause if it is started by upstream jobs > 1 nov 2015 kl. 13:21 skrev GS_L : > > The problem is that the EnvInject isn't enabled through the BuildFlow

Re: Access BUILD_CAUSE and BUILD_CAUSE_USERIDCAUSE through Build Flow DSL

2015-11-01 Thread GS_L
The problem is that the EnvInject isn't enabled through the BuildFlow. On Thursday, October 29, 2015 at 10:15:58 PM UTC+2, Martin d'Anjou wrote: > > Been asking myself the same question for 3 years. The only solution for me > is to use EnvInject, fetch the cause from the Jenkins internal objects,

Re: Access BUILD_CAUSE and BUILD_CAUSE_USERIDCAUSE through Build Flow DSL

2015-10-29 Thread Martin d'Anjou
Been asking myself the same question for 3 years. The only solution for me is to use EnvInject, fetch the cause from the Jenkins internal objects, and export it as a new env variable to the build. It gets complicated when the cause is another build, you have to do a recursive search to get to th

Access BUILD_CAUSE and BUILD_CAUSE_USERIDCAUSE through Build Flow DSL

2015-10-29 Thread GS_L
Hi To know who triggered a buildflow job I tried to print the BUILD_CAUSE env variable in the following ways: 1. println "BUILD_CAUSE = $BUILD_CAUSE" build failed - error: ERROR: Failed to run DSL Script groovy.lang.MissingPropertyException