I am trying to set a configuration's general settings through Groovy. General settings such as build condition and build schedule. I've found the "configuration" class doc in 7.0.28 release Javadoc. And there are indeed the function
public void setBuildCondition(BuildCondition buildCondition) public void setSchedule(Schedule schedule)
I looked into the class "Schedule" and "BuildCondition", and still have no idea how to use them.
There isn't an example for the functions. And I'm not sure if I need to use some kind of "manager" class to create such arguments to pass it in or to put these operations in session.
Anyway, I'm trying to disable the build schedule for a template configuration, and I only copy that template as new when needed, and I would like the newly created "real" configuration to be able to build by schedule (by setting the build schedule or build condition via Groovy. I figure we can just disable either the schedule or build condition, not have to be both).
The condition is detect repo changes, and schedule is based on periodic schedule.
Could you show me how this is done?
Thank you very much!
- solved #2
- replies 5
- views 1372
- stars 0