branch-api: Support skip-rate-limit param
Change-Id: I4d86b24519381cc76e669f89d8e313f9c30ad999 Signed-off-by: Tan Heng Yeow <E0032242@u.nus.edu>
This commit is contained in:
parent
b23394b47b
commit
2d80dd00d4
|
@ -302,6 +302,8 @@ def branch_api(registry, xml_parent, data):
|
|||
of builds will be enforced. (default 'Hour')
|
||||
|
||||
:valid values: **Hour**, **Day**, **Week**, **Month**, **Year**
|
||||
:arg bool skip-rate-limit: Permit user triggered builds to
|
||||
skip the rate limit (default false)
|
||||
|
||||
Minimal Example:
|
||||
|
||||
|
@ -324,6 +326,7 @@ def branch_api(registry, xml_parent, data):
|
|||
mapping = [
|
||||
('time-period', 'durationName', 'Hour', valid_time_periods),
|
||||
('number-of-builds', 'count', 1),
|
||||
('skip-rate-limit', 'userBoost', False),
|
||||
]
|
||||
helpers.convert_mapping_to_xml(branch, data, mapping, fail_required=True)
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
<jenkins.branch.RateLimitBranchProperty_-JobPropertyImpl plugin="branch-api">
|
||||
<durationName>Day</durationName>
|
||||
<count>5</count>
|
||||
<userBoost>true</userBoost>
|
||||
</jenkins.branch.RateLimitBranchProperty_-JobPropertyImpl>
|
||||
</properties>
|
||||
</project>
|
||||
|
|
|
@ -2,3 +2,4 @@ properties:
|
|||
- branch-api:
|
||||
time-period: Day
|
||||
number-of-builds: 5
|
||||
skip-rate-limit: true
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
<jenkins.branch.RateLimitBranchProperty_-JobPropertyImpl plugin="branch-api">
|
||||
<durationName>Hour</durationName>
|
||||
<count>1</count>
|
||||
<userBoost>false</userBoost>
|
||||
</jenkins.branch.RateLimitBranchProperty_-JobPropertyImpl>
|
||||
</properties>
|
||||
</project>
|
||||
|
|
Loading…
Reference in New Issue