Hi,

Jenkins generates environment variable BUILD_CAUSE for each build that 
contains the information you seek. The values are something like 
'UPSTREAMTRIGGER', 'SCMTRIGGER', 'TIMERTRIGGER', and so forth.
 
Also, if you have Conditional BuildStep Plugin 
<https://wiki.jenkins-ci.org/display/JENKINS/Conditional+BuildStep+Plugin>, 
it contains condition for Build Cause, which lists all registered triggers.

-Olli

On Monday, April 18, 2016 at 4:39:37 AM UTC+3, zhangkm wrote:
>
> Hello, 
>    As we know, we can select build triggers in jenkins, such as Poll SCM, 
> Build periodically, Build after other projects are built, etc. In my build 
> job, I use SVN as CVS and I select Build periodically and  Poll SCM as 
> build 
> trigger. 
> <http://jenkins-ci.361315.n4.nabble.com/file/n4807513/build-trigger.png> 
>    Now I want to know which build trigger to kick off the build job, so I 
> can execute different bat file or   pass different parameters depend on 
> different trigger. For example, if  Build periodically trigger the build, 
> I 
> will pass the parameter 'buildall=true', else I will pass the parameter 
> 'buildall=false'. 
>    Please tell me how to make it come true, or any other way to solve this 
> problem? 
>
>
>
> -- 
> View this message in context: 
> http://jenkins-ci.361315.n4.nabble.com/How-to-distinguish-which-build-trigger-to-kick-off-the-build-tp4807513.html
>  
> Sent from the Jenkins users mailing list archive at Nabble.com. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/5914c8af-a0f9-458c-a312-599cb37c452f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to