Support for Naginator-Opt-Out property
Test case is added. Change-Id: I3d26391b9f8f4cd5e3ca8df38271c4a01f7b8ce2 Signed-off-by: Eren ATAS <eatas.contractor@libertyglobal.com>
This commit is contained in:
parent
1db5898624
commit
fed356f4ac
@ -230,6 +230,27 @@ def gitlab_logo(registry, xml_parent, data):
|
||||
helpers.convert_mapping_to_xml(logo, data, mapping, fail_required=True)
|
||||
|
||||
|
||||
def naginator_opt_out(registry, xml_parent, data):
|
||||
"""yaml: naginator-opt-out
|
||||
Lets you opt-out so no rebuild option for Naginator is added.
|
||||
|
||||
Requires the Jenkins :jenkins-plugins:`Naginator Plugin <naginator>`.
|
||||
|
||||
:arg bool opt-out: enables the rebuild option (default False).
|
||||
|
||||
Example:
|
||||
|
||||
.. literalinclude:: /../../tests/properties/fixtures/naginator-opt-out002.yaml
|
||||
:language: yaml
|
||||
"""
|
||||
|
||||
opt_out = XML.SubElement(
|
||||
xml_parent, "com.chikli.hudson.plugin.naginator." "NaginatorOptOutProperty"
|
||||
)
|
||||
mapping = [("opt-out", "optOut", False)]
|
||||
helpers.convert_mapping_to_xml(opt_out, data, mapping, fail_required=True)
|
||||
|
||||
|
||||
def disk_usage(registry, xml_parent, data):
|
||||
"""yaml: disk-usage
|
||||
Enables the Disk Usage Plugin.
|
||||
|
8
tests/properties/fixtures/naginator-opt-out001.xml
Normal file
8
tests/properties/fixtures/naginator-opt-out001.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<project>
|
||||
<properties>
|
||||
<com.chikli.hudson.plugin.naginator.NaginatorOptOutProperty>
|
||||
<optOut>false</optOut>
|
||||
</com.chikli.hudson.plugin.naginator.NaginatorOptOutProperty>
|
||||
</properties>
|
||||
</project>
|
2
tests/properties/fixtures/naginator-opt-out001.yaml
Normal file
2
tests/properties/fixtures/naginator-opt-out001.yaml
Normal file
@ -0,0 +1,2 @@
|
||||
properties:
|
||||
- naginator-opt-out
|
8
tests/properties/fixtures/naginator-opt-out002.xml
Normal file
8
tests/properties/fixtures/naginator-opt-out002.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<project>
|
||||
<properties>
|
||||
<com.chikli.hudson.plugin.naginator.NaginatorOptOutProperty>
|
||||
<optOut>true</optOut>
|
||||
</com.chikli.hudson.plugin.naginator.NaginatorOptOutProperty>
|
||||
</properties>
|
||||
</project>
|
3
tests/properties/fixtures/naginator-opt-out002.yaml
Normal file
3
tests/properties/fixtures/naginator-opt-out002.yaml
Normal file
@ -0,0 +1,3 @@
|
||||
properties:
|
||||
- naginator-opt-out:
|
||||
opt-out: true
|
Loading…
Reference in New Issue
Block a user