The 'envinject plugin' publishes the causes of the build as environment 
variables:
BUILD_CAUSE: contains all causes coma separated
BUILD_CAUSE=USERIDCAUSE, SCMTRIGGER, UPSTREAMTRIGGER 

In addition, each cause is exposed as a single envvariable too:
BUILD_CAUSE_USERIDCAUSE=true
BUILD_CAUSE_SCMTRIGGER=true
BUILD_CAUSE_UPSTREAMTRIGGER=true

/Domi

https://wiki.jenkins-ci.org/display/JENKINS/EnvInject+Plugin

On 20.12.2012, at 17:51, Lars Nordin <lnor...@internap.com> wrote:

> Is there any way to determine trigger source, whether manual build or scm 
> change?
>  
> I have a job that takes a parameter when manually triggered but when 
> triggered from a git commit I plan to set that parameter from info gathered 
> from GIT. I guess one way would be to change the default parameter to a 
> “null” value then I would know that the build was triggered by SCM change – 
> are there any other ways?

Reply via email to