def inject_passwords(registry, xml_parent, data):
 eib = XML.SubElement(xml_parent, 'EnvInjectPasswordWrapper')
 XML.SubElement(eib, 'injectGlobalPasswords').text = str(data.get('global', False)).lower()
 XML.SubElement(eib, 'maskPasswordParameters').text = str(data.get('mask-password-params', False)).lower()
 entries = XML.SubElement(eib, 'passwordEntries')
 passwords = data.get('job-passwords', [])
 if passwords:
  for password in passwords:
   entry = XML.SubElement(entries, 'EnvInjectPasswordEntry')
   XML.SubElement(entry, 'name').text = password['name']
   XML.SubElement(entry, 'value').text = password['password']

def inject_passwords ( registry , xml_parent , data ) : eib = XML . SubElement ( xml_parent , 'EnvInjectPasswordWrapper' ) XML . SubElement ( eib , 'injectGlobalPasswords' ) . text = str ( data . get ( 'global' , False ) ) . lower ( ) XML . SubElement ( eib , 'maskPasswordParameters' ) . text = str ( data . get ( 'mask-password-params' , False ) ) . lower ( ) entries = XML . SubElement ( eib , 'passwordEntries' ) passwords = data . get ( 'job-passwords' , [ ] ) if passwords : for password in passwords : entry = XML . SubElement ( entries , 'EnvInjectPasswordEntry' ) XML . SubElement ( entry , 'name' ) . text = password [ 'name' ] XML . SubElement ( entry , 'value' ) . text = password [ 'password' ]
yaml: inject-passwords inject passwords to the build as environment variables .