Support for Build Failure Analyzer plugin
Change-Id: Iac57193984751a8e93b83a38e7e3bf140821edab
This commit is contained in:
parent
0e1b708ad5
commit
288308b476
@ -1054,6 +1054,33 @@ def build_discarder(registry, xml_parent, data):
|
||||
helpers.convert_mapping_to_xml(strategy, data, mappings, fail_required=True)
|
||||
|
||||
|
||||
def build_failure_analyzer(registry, xml_parent, data):
|
||||
"""yaml: build-failure-analyzer
|
||||
|
||||
Controls failure cause analysis for builds.
|
||||
Requires the Jenkins :jenkins-plugins:`Build Failure Analyzer Plugin
|
||||
<build-failure-analyzer>`.
|
||||
|
||||
Example:
|
||||
|
||||
.. literalinclude::
|
||||
/../../tests/properties/fixtures/build-failure-analyzer-001.yaml
|
||||
:language: yaml
|
||||
|
||||
.. literalinclude::
|
||||
/../../tests/properties/fixtures/build-failure-analyzer-003.yaml
|
||||
:language: yaml
|
||||
"""
|
||||
base_sub = XML.SubElement(
|
||||
xml_parent, "com.sonyericsson.jenkins.plugins.bfa.model.ScannerJobProperty"
|
||||
)
|
||||
|
||||
mappings = [
|
||||
("disabled", "doNotScan", False),
|
||||
]
|
||||
helpers.convert_mapping_to_xml(base_sub, data, mappings, fail_required=True)
|
||||
|
||||
|
||||
def slave_prerequisites(registry, xml_parent, data):
|
||||
"""yaml: slave-prerequisites
|
||||
This plugin allows you to check prerequisites on slave before
|
||||
|
0
tests/__init__.py
Normal file
0
tests/__init__.py
Normal file
8
tests/properties/fixtures/build-failure-analyzer-001.xml
Normal file
8
tests/properties/fixtures/build-failure-analyzer-001.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<project>
|
||||
<properties>
|
||||
<com.sonyericsson.jenkins.plugins.bfa.model.ScannerJobProperty>
|
||||
<doNotScan>false</doNotScan>
|
||||
</com.sonyericsson.jenkins.plugins.bfa.model.ScannerJobProperty>
|
||||
</properties>
|
||||
</project>
|
@ -0,0 +1,2 @@
|
||||
properties:
|
||||
- build-failure-analyzer
|
8
tests/properties/fixtures/build-failure-analyzer-002.xml
Normal file
8
tests/properties/fixtures/build-failure-analyzer-002.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<project>
|
||||
<properties>
|
||||
<com.sonyericsson.jenkins.plugins.bfa.model.ScannerJobProperty>
|
||||
<doNotScan>false</doNotScan>
|
||||
</com.sonyericsson.jenkins.plugins.bfa.model.ScannerJobProperty>
|
||||
</properties>
|
||||
</project>
|
@ -0,0 +1,3 @@
|
||||
properties:
|
||||
- build-failure-analyzer:
|
||||
disabled: false
|
8
tests/properties/fixtures/build-failure-analyzer-003.xml
Normal file
8
tests/properties/fixtures/build-failure-analyzer-003.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<project>
|
||||
<properties>
|
||||
<com.sonyericsson.jenkins.plugins.bfa.model.ScannerJobProperty>
|
||||
<doNotScan>true</doNotScan>
|
||||
</com.sonyericsson.jenkins.plugins.bfa.model.ScannerJobProperty>
|
||||
</properties>
|
||||
</project>
|
@ -0,0 +1,3 @@
|
||||
properties:
|
||||
- build-failure-analyzer:
|
||||
disabled: true
|
Loading…
x
Reference in New Issue
Block a user