def monitor_folders(registry, xml_parent, data):
 ft = XML.SubElement(xml_parent, 'org.jenkinsci.plugins.fstrigger.triggers.FolderContentTrigger')
 ft.set('plugin', 'fstrigger')
 mappings = [('path', 'path', ''), ('cron', 'spec', '')]
 convert_mapping_to_xml(ft, data, mappings, fail_required=True)
 includes = data.get('includes', '')
 XML.SubElement(ft, 'includes').text = ','.join(includes)
 XML.SubElement(ft, 'excludes').text = data.get('excludes', '')
 XML.SubElement(ft, 'excludeCheckLastModificationDate').text = str((not data.get('check-modification-date', True))).lower()
 XML.SubElement(ft, 'excludeCheckContent').text = str((not data.get('check-content', True))).lower()
 XML.SubElement(ft, 'excludeCheckFewerOrMoreFiles').text = str((not data.get('check-fewer', True))).lower()

def monitor_folders ( registry , xml_parent , data ) : ft = XML . SubElement ( xml_parent , 'org.jenkinsci.plugins.fstrigger.triggers.FolderContentTrigger' ) ft . set ( 'plugin' , 'fstrigger' ) mappings = [ ( 'path' , 'path' , '' ) , ( 'cron' , 'spec' , '' ) ] convert_mapping_to_xml ( ft , data , mappings , fail_required = True ) includes = data . get ( 'includes' , '' ) XML . SubElement ( ft , 'includes' ) . text = ',' . join ( includes ) XML . SubElement ( ft , 'excludes' ) . text = data . get ( 'excludes' , '' ) XML . SubElement ( ft , 'excludeCheckLastModificationDate' ) . text = str ( ( not data . get ( 'check-modification-date' , True ) ) ) . lower ( ) XML . SubElement ( ft , 'excludeCheckContent' ) . text = str ( ( not data . get ( 'check-content' , True ) ) ) . lower ( ) XML . SubElement ( ft , 'excludeCheckFewerOrMoreFiles' ) . text = str ( ( not data . get ( 'check-fewer' , True ) ) ) . lower ( )
yaml: monitor-folders configure jenkins to monitor folders .