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

Lack of documentation

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • core

      Hi Team!

      I tried to find way how to create library using jenkins CLI or groovy code, but without any success.

      It would be really helpful to provide example of groove code how to configure library.

      It is really necessary if Jenkins with library should be installed in auto-mode using chef/puppet/salt/you-faivorite-tool.

      Now the only way I found is to use www-based interface, and it is really too complicate to automate it.

      As example of automation I added snippet of code to configure Jenkins security.
      I'd like to see something like this to add libs.

       echo '
        import jenkins.model.*
        import hudson.security.*
        def instance = Jenkins.getInstance()
        def hudsonRealm = new HudsonPrivateSecurityRealm(false)
        hudsonRealm.createAccount(\"USER\", \"PASSWORD\")
        instance.setSecurityRealm(hudsonRealm)
        strategy = new hudson.security.FullControlOnceLoggedInAuthorizationStrategy()
        instance.setAuthorizationStrategy(strategy)
        instance.save()
      ' | java -jar /path/to/jenkins_cli groovy = 
      

            Unassigned Unassigned
            sirmax123 Max Maxur
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: