Cannot populate servers via groovy script

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      Using groovy script like this:

      import jenkins.model.*
      import hudson.security.*
      import hudson.plugins.active_directory.*

      def instance = Jenkins.getInstance()
      String domain = 'mydomain.com'
      String site = null
      String server = 'my_ldap_server'
      String bindName = null
      String bindPassword = null

      adrealm = new ActiveDirectorySecurityRealm(domain, site, bindName, bindPassword, server)
      instance.setSecurityRealm(adrealm)

      instance.save()

      field domain controllers remains empty. This was working in previous version of plugin and it's somehow related to multiple domain support.

            Assignee:
            Félix Belzunce Arcos
            Reporter:
            Sebastian Maj
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: