In my never-ending quest to create a deployment script for Jenkins (why is 
this so difficult?), I would like to be able to configure the quiet period 
on startup, *without needing to configure it through the UI*.

Is there a way of configuring this through groovy? Ideally I would like to 
place a script in my init.groovy.d/ so that it will be triggered 
automatically.

In the class files, I found jenkins.model.GlobalQuietPeriodConfiguration, 
but this only exposes a method to get the quiet period

gqpc = new jenkins.model.GlobalQuietPeriodConfiguration()
gqpc.getQuietPeriod()

Result: 5
>
>
There is a method boolean configure(org.kohsuke.stapler.StaplerRequest req, 
net.sf.json.JSONObject json), but this appears to be designed solely to be 
called from the UI.

Is there some standard pattern by which I could construct a dummy 
StaplerRequest so I can run configuration in my groovy script?

Alternatively, is there some other public method I could or should be using?

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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/5fac40cf-3469-4819-b9da-44e19d93b630%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to