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

Cannot populate servers via groovy script

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Labels:
      None
    • Environment:
      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
    • Similar Issues:

      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

            • Assignee:
              fbelzunc Félix Belzunce Arcos
              Reporter:
              smaj Sebastian Maj
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: