There is also the conditional build step plugin which you can use which will allow check the build cause and then run a single or multiple buildstep(s). https://wiki.jenkins-ci.org/display/JENKINS/Conditional+BuildStep+Plugin
You will need to have separate buildsteps in this case, for each of the different causes and the common parts. Chris On Friday, June 29, 2012 5:56:24 PM UTC+1, gboissinot wrote: > > Check the BUILD_CAUSE environment variable value from your program. > By default, the values can be: > - MANUALTRIGGER > - SCMTRIGGER > - MANUALTRIGGER > UPSTREAMTRIGGER > > Then, plugins (such as XTrigger plugins) can provide additional cause > values. > > On Fri, Jun 29, 2012 at 10:19 AM, benjamin.a.lau <[email protected] > > wrote: > >> Hello, >> >> Is there some way to determine from a shell build step whether the >> current job was scheduled or started manually (via web interface)? I'm >> trying to implement a single job but i need slightly different behavior >> when scheduling the job vs running it directly. If there isn't that's okay >> i can just create wrapping jobs with the different defaults I need... but i >> find this solution a bit clunky. >> >> Thanks in advance, >> Ben >> > >
