Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-39676

Cannot populate servers via groovy script

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved (View Workflow)
    • Minor
    • Resolution: Fixed
    • None
    • Centos 7.2
      java-1.8.0-openjdk-1.8.0.111-1.b15.el7_2
      jenkins-2.19.2-1.1
      Active Directory plugin 2.0

    Description

      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.

      Attachments

        Activity

          People

            fbelzunc FĂ©lix Belzunce Arcos
            smaj Sebastian Maj
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: