Pipeline Recipe for Timer Cause vs User Build Button Cause?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Pipeline Recipe for Timer Cause vs User Build Button Cause?

jieryn
I use the latest Jenkins release with all the common plugins fully up
to date on RHEL 7 via Java 8.

Does anyone happen to have a recipe I can follow to set different
`defaultValue` for ```parameters { booleanParam (defaultValue: xxx,
...) }``` depending on whether the this run was triggered by a timer
action or by a user action?

I use build parameters to enable/disable various stages in the
pipeline, many of which are long running, depending on whether or not
I want to pay the cost/time for those stages at that moment. Sometimes
I just want to quickly get through to a particular phase of testing,
or perhaps to production deployment. And I know I can skip the costly
phases and just get right to where I want the build to go, but still
using the automated pipeline which has become the standard vehicle for
delivering to production.

I'm finding that when the build is triggered via timer, Jenkins should
not skip any stages; but it is common when developers trigger builds
manually that build execution is always customized in common ways. Any
help is appreciated to reduce the amount of time I'm spending clicking
checkboxes in manually triggered builds,

Thanks!

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAArU9iY4tit3EJXcgFuaG4Uv9zpAHa8xQ6%3DE9AjOs%3DN1yaVAiw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Pipeline Recipe for Timer Cause vs User Build Button Cause?

Victor Martinez
I guess the below can help you out with the build cause:
- https://github.com/jenkinsci/pipeline-examples/tree/master/pipeline-examples/get-build-cause

cheers

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/1bb78242-0381-49cf-9ae3-9597646178f2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.