Merge "branch-api: Support skip-rate-limit param"
This commit is contained in:
commit
b2be223224
@ -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…
x
Reference in New Issue
Block a user