summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--jenkins_jobs/modules/properties.py15
-rw-r--r--tests/properties/fixtures/disk-usage.xml6
-rw-r--r--tests/properties/fixtures/disk-usage.yaml2
3 files changed, 23 insertions, 0 deletions
diff --git a/jenkins_jobs/modules/properties.py b/jenkins_jobs/modules/properties.py
index 61ada1af..9565aa22 100644
--- a/jenkins_jobs/modules/properties.py
+++ b/jenkins_jobs/modules/properties.py
@@ -206,6 +206,21 @@ def gitlab(registry, xml_parent, data):
helpers.convert_mapping_to_xml(gitlab, data, mapping, fail_required=True)
+def disk_usage(registry, xml_parent, data):
+ """yaml: disk-usage
+ Enables the Disk Usage Plugin.
+ Requires the Jenkins :jenkins-wiki:`Disk Usage Plugin <Disk+Usage+Plugin>`.
+
+ Example:
+
+ .. literalinclude:: /../../tests/properties/fixtures/disk-usage.yaml
+ :language: yaml
+ """
+ XML.SubElement(xml_parent,
+ 'hudson.plugins.disk__usage.'
+ 'DiskUsageProperty')
+
+
def least_load(registry, xml_parent, data):
"""yaml: least-load
Enables the Least Load Plugin.
diff --git a/tests/properties/fixtures/disk-usage.xml b/tests/properties/fixtures/disk-usage.xml
new file mode 100644
index 00000000..0779afa8
--- /dev/null
+++ b/tests/properties/fixtures/disk-usage.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<project>
+ <properties>
+ <hudson.plugins.disk__usage.DiskUsageProperty/>
+ </properties>
+</project>
diff --git a/tests/properties/fixtures/disk-usage.yaml b/tests/properties/fixtures/disk-usage.yaml
new file mode 100644
index 00000000..d102b488
--- /dev/null
+++ b/tests/properties/fixtures/disk-usage.yaml
@@ -0,0 +1,2 @@
+properties:
+ - disk-usage