def beaker(registry, xml_parent, data):
 beaker = XML.SubElement(xml_parent, 'org.jenkinsci.plugins.beakerbuilder.BeakerBuilder')
 jobSource = XML.SubElement(beaker, 'jobSource')
 if (('content' in data) and ('path' in data)):
  raise JenkinsJobsException("Use just one of 'content' or 'path'")
 elif ('content' in data):
  jobSourceClass = 'org.jenkinsci.plugins.beakerbuilder.StringJobSource'
  jobSource.set('class', jobSourceClass)
  XML.SubElement(jobSource, 'jobContent').text = data['content']
 elif ('path' in data):
  jobSourceClass = 'org.jenkinsci.plugins.beakerbuilder.FileJobSource'
  jobSource.set('class', jobSourceClass)
  XML.SubElement(jobSource, 'jobPath').text = data['path']
 else:
  raise JenkinsJobsException("Use one of 'content' or 'path'")
 XML.SubElement(beaker, 'downloadFiles').text = str(data.get('download-logs', False)).lower()

def beaker ( registry , xml_parent , data ) : beaker = XML . SubElement ( xml_parent , 'org.jenkinsci.plugins.beakerbuilder.BeakerBuilder' ) jobSource = XML . SubElement ( beaker , 'jobSource' ) if ( ( 'content' in data ) and ( 'path' in data ) ) : raise JenkinsJobsException ( "Use just one of 'content' or 'path'" ) elif ( 'content' in data ) : jobSourceClass = 'org.jenkinsci.plugins.beakerbuilder.StringJobSource' jobSource . set ( 'class' , jobSourceClass ) XML . SubElement ( jobSource , 'jobContent' ) . text = data [ 'content' ] elif ( 'path' in data ) : jobSourceClass = 'org.jenkinsci.plugins.beakerbuilder.FileJobSource' jobSource . set ( 'class' , jobSourceClass ) XML . SubElement ( jobSource , 'jobPath' ) . text = data [ 'path' ] else : raise JenkinsJobsException ( "Use one of 'content' or 'path'" ) XML . SubElement ( beaker , 'downloadFiles' ) . text = str ( data . get ( 'download-logs' , False ) ) . lower ( )
yaml: beaker execute a beaker build step .