Merge "Add support for Sonar wrapper"

This commit is contained in:
Jenkins 2016-10-21 11:31:29 +00:00 committed by Gerrit Code Review
commit fc7ede077a
5 changed files with 47 additions and 0 deletions

View File

@ -1333,6 +1333,34 @@ def sauce_ondemand(registry, xml_parent, data):
XML.SubElement(sauce, 'options').text = options
def sonar(registry, xml_parent, data):
"""yaml: sonar
Wrapper for SonarQube Plugin
Requires :jenkins-wiki:`SonarQube plugin <SonarQube+plugin>`
:arg str install-name: Release goals and options (default '')
Minimal Example:
.. literalinclude:: /../../tests/wrappers/fixtures/sonar-minimal.yaml
:language: yaml
Full Example:
.. literalinclude:: /../../tests/wrappers/fixtures/sonar-full.yaml
:language: yaml
"""
sonar = XML.SubElement(
xml_parent, 'hudson.plugins.sonar.SonarBuildWrapper')
sonar.set('plugin', 'sonar')
if data.get('install-name'):
mapping = [
('install-name', 'installationName', ''),
]
convert_mapping_to_xml(sonar, data, mapping, fail_required=True)
def pathignore(registry, xml_parent, data):
"""yaml: pathignore
This plugin allows SCM-triggered jobs to ignore

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<project>
<buildWrappers>
<hudson.plugins.sonar.SonarBuildWrapper plugin="sonar">
<installationName>test-sonar-installation</installationName>
</hudson.plugins.sonar.SonarBuildWrapper>
</buildWrappers>
</project>

View File

@ -0,0 +1,3 @@
wrappers:
- sonar:
install-name: test-sonar-installation

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<project>
<buildWrappers>
<hudson.plugins.sonar.SonarBuildWrapper plugin="sonar"/>
</buildWrappers>
</project>

View File

@ -0,0 +1,2 @@
wrappers:
- sonar