Merge "Second & Minute are now supported by branch-api"

This commit is contained in:
Zuul 2021-07-14 23:15:13 +00:00 committed by Gerrit Code Review
commit 461aa97bdd
3 changed files with 16 additions and 2 deletions

View File

@ -383,7 +383,7 @@ def branch_api(registry, xml_parent, data):
:arg str time-period: The time period within which the maximum number
of builds will be enforced. (default 'Hour')
:valid values: **Hour**, **Day**, **Week**, **Month**, **Year**
:valid values: **Second** **Minute** **Hour**, **Day**, **Week**, **Month**, **Year**
:arg bool skip-rate-limit: Permit user triggered builds to
skip the rate limit (default false)
@ -404,7 +404,7 @@ def branch_api(registry, xml_parent, data):
)
branch.set("plugin", "branch-api")
valid_time_periods = ["Hour", "Day", "Week", "Month", "Year"]
valid_time_periods = ["Second", "Minute", "Hour", "Day", "Week", "Month", "Year"]
mapping = [
("time-period", "durationName", "Hour", valid_time_periods),

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<project>
<properties>
<jenkins.branch.RateLimitBranchProperty_-JobPropertyImpl plugin="branch-api">
<durationName>Minute</durationName>
<count>3</count>
<userBoost>false</userBoost>
</jenkins.branch.RateLimitBranchProperty_-JobPropertyImpl>
</properties>
</project>

View File

@ -0,0 +1,4 @@
properties:
- branch-api:
time-period: Minute
number-of-builds: 3