diff --git a/jenkins_jobs/modules/properties.py b/jenkins_jobs/modules/properties.py index 6aaaf51b7..c53c5af59 100644 --- a/jenkins_jobs/modules/properties.py +++ b/jenkins_jobs/modules/properties.py @@ -381,9 +381,9 @@ def branch_api(registry, xml_parent, data): :arg int number-of-builds: The maximum number of builds allowed within the specified time period. (default 1) :arg str time-period: The time period within which the maximum number - of builds will be enforced. (default 'Hour') + of builds will be enforced. (default 'hour') - :valid values: **Second** **Minute** **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,10 +404,10 @@ def branch_api(registry, xml_parent, data): ) branch.set("plugin", "branch-api") - valid_time_periods = ["Second", "Minute", "Hour", "Day", "Week", "Month", "Year"] + valid_time_periods = ["second", "minute", "hour", "day", "week", "month", "year"] mapping = [ - ("time-period", "durationName", "Hour", valid_time_periods), + ("time-period", "durationName", "hour", valid_time_periods), ("number-of-builds", "count", 1), ("skip-rate-limit", "userBoost", False), ] diff --git a/tests/properties/fixtures/branch-api-full.xml b/tests/properties/fixtures/branch-api-full.xml index 90832bac1..05ad4ce25 100644 --- a/tests/properties/fixtures/branch-api-full.xml +++ b/tests/properties/fixtures/branch-api-full.xml @@ -2,7 +2,7 @@ - Day + day 5 true diff --git a/tests/properties/fixtures/branch-api-full.yaml b/tests/properties/fixtures/branch-api-full.yaml index 6adc44c71..64f53e4df 100644 --- a/tests/properties/fixtures/branch-api-full.yaml +++ b/tests/properties/fixtures/branch-api-full.yaml @@ -1,5 +1,5 @@ properties: - branch-api: - time-period: Day + time-period: day number-of-builds: 5 skip-rate-limit: true diff --git a/tests/properties/fixtures/branch-api-minimal.xml b/tests/properties/fixtures/branch-api-minimal.xml index f483478f7..d537f8698 100644 --- a/tests/properties/fixtures/branch-api-minimal.xml +++ b/tests/properties/fixtures/branch-api-minimal.xml @@ -2,7 +2,7 @@ - Hour + hour 1 false diff --git a/tests/properties/fixtures/branch-api-minute.xml b/tests/properties/fixtures/branch-api-minute.xml index e6c152ee4..8a19259dc 100644 --- a/tests/properties/fixtures/branch-api-minute.xml +++ b/tests/properties/fixtures/branch-api-minute.xml @@ -2,7 +2,7 @@ - Minute + minute 3 false diff --git a/tests/properties/fixtures/branch-api-minute.yaml b/tests/properties/fixtures/branch-api-minute.yaml index 4fa8a521a..1169fe324 100644 --- a/tests/properties/fixtures/branch-api-minute.yaml +++ b/tests/properties/fixtures/branch-api-minute.yaml @@ -1,4 +1,4 @@ properties: - branch-api: - time-period: Minute + time-period: minute number-of-builds: 3