def sonar(registry, xml_parent, data):
 sonar = XML.SubElement(xml_parent, 'hudson.plugins.sonar.SonarPublisher')
 sonar.set('plugin', 'sonar')
 if ('jdk' in data):
  XML.SubElement(sonar, 'jdk').text = data['jdk']
 mappings = [('branch', 'branch', ''), ('language', 'language', ''), ('root-pom', 'rootPom', 'pom.xml'), ('private-maven-repo', 'usePrivateRepository', False), ('maven-opts', 'mavenOpts', ''), ('additional-properties', 'jobAdditionalProperties', '')]
 helpers.convert_mapping_to_xml(sonar, data, mappings, fail_required=True)
 if ('skip-global-triggers' in data):
  data_triggers = data['skip-global-triggers']
  triggers = XML.SubElement(sonar, 'triggers')
  triggers_mappings = [('skip-when-scm-change', 'skipScmCause', False), ('skip-when-upstream-build', 'skipUpstreamCause', False), ('skip-when-envvar-defined', 'envVar', '')]
  helpers.convert_mapping_to_xml(triggers, data_triggers, triggers_mappings, fail_required=True)
 helpers.config_file_provider_settings(sonar, data)

def sonar ( registry , xml_parent , data ) : sonar = XML . SubElement ( xml_parent , 'hudson.plugins.sonar.SonarPublisher' ) sonar . set ( 'plugin' , 'sonar' ) if ( 'jdk' in data ) : XML . SubElement ( sonar , 'jdk' ) . text = data [ 'jdk' ] mappings = [ ( 'branch' , 'branch' , '' ) , ( 'language' , 'language' , '' ) , ( 'root-pom' , 'rootPom' , 'pom.xml' ) , ( 'private-maven-repo' , 'usePrivateRepository' , False ) , ( 'maven-opts' , 'mavenOpts' , '' ) , ( 'additional-properties' , 'jobAdditionalProperties' , '' ) ] helpers . convert_mapping_to_xml ( sonar , data , mappings , fail_required = True ) if ( 'skip-global-triggers' in data ) : data_triggers = data [ 'skip-global-triggers' ] triggers = XML . SubElement ( sonar , 'triggers' ) triggers_mappings = [ ( 'skip-when-scm-change' , 'skipScmCause' , False ) , ( 'skip-when-upstream-build' , 'skipUpstreamCause' , False ) , ( 'skip-when-envvar-defined' , 'envVar' , '' ) ] helpers . convert_mapping_to_xml ( triggers , data_triggers , triggers_mappings , fail_required = True ) helpers . config_file_provider_settings ( sonar , data )
yaml: sonar wrapper for sonarqube plugin requires :jenkins-wiki:sonarqube plugin <sonarqube+plugin> :arg str install-name: release goals and options minimal example: .