def inject(registry, xml_parent, data):
 inject = XML.SubElement(xml_parent, 'EnvInjectJobProperty')
 info = XML.SubElement(inject, 'info')
 jenkins_jobs.modules.base.add_nonblank_xml_subelement(info, 'propertiesFilePath', data.get('properties-file'))
 jenkins_jobs.modules.base.add_nonblank_xml_subelement(info, 'propertiesContent', data.get('properties-content'))
 jenkins_jobs.modules.base.add_nonblank_xml_subelement(info, 'scriptFilePath', data.get('script-file'))
 jenkins_jobs.modules.base.add_nonblank_xml_subelement(info, 'scriptContent', data.get('script-content'))
 jenkins_jobs.modules.base.add_nonblank_xml_subelement(info, 'groovyScriptContent', data.get('groovy-content'))
 XML.SubElement(info, 'loadFilesFromMaster').text = str(data.get('load-from-master', False)).lower()
 XML.SubElement(inject, 'on').text = str(data.get('enabled', True)).lower()
 XML.SubElement(inject, 'keepJenkinsSystemVariables').text = str(data.get('keep-system-variables', True)).lower()
 XML.SubElement(inject, 'keepBuildVariables').text = str(data.get('keep-build-variables', True)).lower()
 XML.SubElement(inject, 'overrideBuildParameters').text = str(data.get('override-build-parameters', False)).lower()

def inject ( registry , xml_parent , data ) : inject = XML . SubElement ( xml_parent , 'EnvInjectJobProperty' ) info = XML . SubElement ( inject , 'info' ) jenkins_jobs . modules . base . add_nonblank_xml_subelement ( info , 'propertiesFilePath' , data . get ( 'properties-file' ) ) jenkins_jobs . modules . base . add_nonblank_xml_subelement ( info , 'propertiesContent' , data . get ( 'properties-content' ) ) jenkins_jobs . modules . base . add_nonblank_xml_subelement ( info , 'scriptFilePath' , data . get ( 'script-file' ) ) jenkins_jobs . modules . base . add_nonblank_xml_subelement ( info , 'scriptContent' , data . get ( 'script-content' ) ) jenkins_jobs . modules . base . add_nonblank_xml_subelement ( info , 'groovyScriptContent' , data . get ( 'groovy-content' ) ) XML . SubElement ( info , 'loadFilesFromMaster' ) . text = str ( data . get ( 'load-from-master' , False ) ) . lower ( ) XML . SubElement ( inject , 'on' ) . text = str ( data . get ( 'enabled' , True ) ) . lower ( ) XML . SubElement ( inject , 'keepJenkinsSystemVariables' ) . text = str ( data . get ( 'keep-system-variables' , True ) ) . lower ( ) XML . SubElement ( inject , 'keepBuildVariables' ) . text = str ( data . get ( 'keep-build-variables' , True ) ) . lower ( ) XML . SubElement ( inject , 'overrideBuildParameters' ) . text = str ( data . get ( 'override-build-parameters' , False ) ) . lower ( )
yaml: inject inject an environment for the job .