Browse Source

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

changes/65/806765/1 3.10.0
Zuul 3 months ago
committed by Gerrit Code Review
parent
commit
461aa97bdd
  1. 4
      jenkins_jobs/modules/properties.py
  2. 10
      tests/properties/fixtures/branch-api-minute.xml
  3. 4
      tests/properties/fixtures/branch-api-minute.yaml

4
jenkins_jobs/modules/properties.py

@ -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),

10
tests/properties/fixtures/branch-api-minute.xml

@ -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>

4
tests/properties/fixtures/branch-api-minute.yaml

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