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

jobDSL doesn't adds shared libraries to folder when in pipeline

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Minor Minor
    • job-dsl-plugin
    • None
    • Jenkins version: 2.75
      Folders plugin: 6.1.2
      Pipeline: Shared Groovy Libraries plugin: 2.8
      Pipeline plugin: 2.5

      Using this snippet (URLS extracted) I've managed to create a folder when in freestyle job and using a jobdsl step (both reading from disk and direct input)

      folder("test") {
        properties { 
          folderLibraries { 
            libraries { [
              libraryConfiguration {
                name("rnd-common")
                implicit(true)
                retriever {
                  scmSourceRetriever {
                    scm {
                      subversionSCMSource {
                        id("scm-library")
                        remoteBase("https://svnpath")
                        credentialsId("some-creds-id")
                        includes('*')
                      }
                    }
                  }
               }
               defaultVersion('/')
             },libraryConfiguration {
               name("build-specific-test")
               implicit(true)
               retriever {
                 scmSourceRetriever {
                   scm {
                     subversionSCMSource {
                       id("scm-library-build-specific-test")
                       remoteBase("https://svnpath")
                       credentialsId("some-creds-id")
                       includes('*')
                     }
                   }
                 }
               }
               defaultVersion('/')
             }
           ]}
         }
       }
      }

      but when I try to create it with the pipeline jobDsl step, I don't get any error, yet the shared libraries aren't created in the folder. More-over, if they are created manually, they are removed.

      Worth mentioning that I am also using the permissive-script-security-plugin

            daspilker Daniel Spilker
            shimitanaka Elad Shmitanka
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: