def kmap(registry, xml_parent, data):
 kmap = XML.SubElement(xml_parent, 'org.jenkinsci.plugins.KmapJenkinsBuilder')
 kmap.set('plugin', 'kmap-jenkins')
 publish = data.get('publish-optional', False)
 mapping = [('username', 'username', None), ('password', 'password', None), ('url', 'kmapClient', None), ('categories', 'categories', None), ('file-path', 'filePath', None), ('app-name', 'appName', None), ('bundle', 'bundle', ''), ('version', 'version', None), ('description', 'description', ''), ('icon-path', 'iconPath', '')]
 convert_mapping_to_xml(kmap, data, mapping, fail_required=True)
 if (publish is True):
  publish_optional = XML.SubElement(kmap, 'publishOptional')
  publish_mapping = [('groups', 'teams', ''), ('users', 'users', ''), ('notify-users', 'sendNotifications', False)]
  convert_mapping_to_xml(publish_optional, data, publish_mapping, fail_required=True)

def kmap ( registry , xml_parent , data ) : kmap = XML . SubElement ( xml_parent , 'org.jenkinsci.plugins.KmapJenkinsBuilder' ) kmap . set ( 'plugin' , 'kmap-jenkins' ) publish = data . get ( 'publish-optional' , False ) mapping = [ ( 'username' , 'username' , None ) , ( 'password' , 'password' , None ) , ( 'url' , 'kmapClient' , None ) , ( 'categories' , 'categories' , None ) , ( 'file-path' , 'filePath' , None ) , ( 'app-name' , 'appName' , None ) , ( 'bundle' , 'bundle' , '' ) , ( 'version' , 'version' , None ) , ( 'description' , 'description' , '' ) , ( 'icon-path' , 'iconPath' , '' ) ] convert_mapping_to_xml ( kmap , data , mapping , fail_required = True ) if ( publish is True ) : publish_optional = XML . SubElement ( kmap , 'publishOptional' ) publish_mapping = [ ( 'groups' , 'teams' , '' ) , ( 'users' , 'users' , '' ) , ( 'notify-users' , 'sendNotifications' , False ) ] convert_mapping_to_xml ( publish_optional , data , publish_mapping , fail_required = True )
yaml: kmap publish mobile applications to your keivox kmap private mobile app store .