def build_publisher(registry, xml_parent, data):
 reporter = XML.SubElement(xml_parent, 'hudson.plugins.build__publisher.BuildPublisher')
 XML.SubElement(reporter, 'publishUnstableBuilds').text = str(data.get('publish-unstable-builds', True)).lower()
 XML.SubElement(reporter, 'publishFailedBuilds').text = str(data.get('publish-failed-builds', True)).lower()
 if (('days-to-keep' in data) or ('num-to-keep' in data)):
  logrotator = XML.SubElement(reporter, 'logRotator')
  XML.SubElement(logrotator, 'daysToKeep').text = str(data.get('days-to-keep', (-1)))
  XML.SubElement(logrotator, 'numToKeep').text = str(data.get('num-to-keep', (-1)))
  XML.SubElement(logrotator, 'artifactDaysToKeep').text = '-1'
  XML.SubElement(logrotator, 'artifactNumToKeep').text = '-1'

def build_publisher ( registry , xml_parent , data ) : reporter = XML . SubElement ( xml_parent , 'hudson.plugins.build__publisher.BuildPublisher' ) XML . SubElement ( reporter , 'publishUnstableBuilds' ) . text = str ( data . get ( 'publish-unstable-builds' , True ) ) . lower ( ) XML . SubElement ( reporter , 'publishFailedBuilds' ) . text = str ( data . get ( 'publish-failed-builds' , True ) ) . lower ( ) if ( ( 'days-to-keep' in data ) or ( 'num-to-keep' in data ) ) : logrotator = XML . SubElement ( reporter , 'logRotator' ) XML . SubElement ( logrotator , 'daysToKeep' ) . text = str ( data . get ( 'days-to-keep' , ( - 1 ) ) ) XML . SubElement ( logrotator , 'numToKeep' ) . text = str ( data . get ( 'num-to-keep' , ( - 1 ) ) ) XML . SubElement ( logrotator , 'artifactDaysToKeep' ) . text = '-1' XML . SubElement ( logrotator , 'artifactNumToKeep' ) . text = '-1'
yaml: build-publisher this plugin allows records from one jenkins to be published on another jenkins .