diff --git a/jenkins_jobs/modules/properties.py b/jenkins_jobs/modules/properties.py index 0d234fa9e..70c375e0d 100644 --- a/jenkins_jobs/modules/properties.py +++ b/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), diff --git a/tests/properties/fixtures/branch-api-minute.xml b/tests/properties/fixtures/branch-api-minute.xml new file mode 100644 index 000000000..e6c152ee4 --- /dev/null +++ b/tests/properties/fixtures/branch-api-minute.xml @@ -0,0 +1,10 @@ + + + + + Minute + 3 + false + + + diff --git a/tests/properties/fixtures/branch-api-minute.yaml b/tests/properties/fixtures/branch-api-minute.yaml new file mode 100644 index 000000000..4fa8a521a --- /dev/null +++ b/tests/properties/fixtures/branch-api-minute.yaml @@ -0,0 +1,4 @@ +properties: + - branch-api: + time-period: Minute + number-of-builds: 3