|
|
|
[
Permlink
| « Hide
]
Robin Shen [04/Jul/14 11:51 PM]
The script gets called whenever QB calls the field getDays(), so it is mainly used to control different cleanup days for different inherited configurations. It does not have the semantic that it only get executed after build is cleaned up, etc. If you'd like to execute certain scripts upon build cleanup finish event, you may create your own maintenance configuration to run separate scritps without relying on the built-in cleanup policy.
OK. If I setBuild Cleanup Strategy Reserve Count to e.g 10, when this script will be executed? After 10 build? For each build above 10?
You can actually input multiline scripts there. Just click on the small multiline icon at left side of the input box. Then you can input any script you want as long as it is enclosed inside:
${...} Every text field (except those explicitly declared to be a script) can accept script this way. We have 5.1.20 - Sat Apr 05 15:38:54 CEST 2014 version.
In Advance Settings for build we have the following options: Build Cleanup Strategy: - Do not clean up builds automatically - Reserve builds by day - Reserve builds by count Artifacts Cleanup Strategy: - Reserve artifacts for specified number of builds - Do not clean up builds automatically - Reserve artifacts for specified number of days We want to execute our groovy script. We do not want to set number of day/number of build e.g vars.get("number_of_day"), we know that it is possible. We want to execute multiline script, which will be execute after build finished, so we want to add fourth option for example: -Execute script, and we enter script in text field. These fields can be scripted already in 5.1.20. Please check it.
|