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

JobDSL folderLibraries is failing after git plugin upgrade to 4.8.1

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • job-dsl-plugin
    • None
    • 2.263.4.2

      After git plugin upgrade from version 4.5.2 to 4.8.1 we are facing issue when using JobDSL for seeding the jobs. Below you can see the definition:

      folder('project-a') {
          displayName('Folder A')
          description('Folder for project A')
          properties {
              folderLibraries {
                  libraries {
                      libraryConfiguration {
                          name("my-lib")
                          retriever {
                              modernSCM {
                                  scm {
                                      git {                        
                                              remote("https://somebitbucket.com/scm/project/reponame.git")
                                              credentialsId("jenkins-bitbucket")
                                      }
                                  }
                              }
                          }
                      }
                  }
              }
          }
      }
      

      I'm getting following error:
      ERROR: (script, line 12) No signature of method: javaposse.jobdsl.plugin.structs.DescribableListContext.git() is applicable for argument types: (script$_run_closure1$_closure2$_closure3$_closure4$_closure5$_closure6$_closure7$_closure8$_closure9) values: [script$_run_closure1$_closure2$_closure3$_closure4$_closure5$_closure6$_closure7$_closure8$_closure9@221abe45]
      Possible solutions: wait(), wait(long), is(java.lang.Object), with(groovy.lang.Closure), any(), find()
      Notifying upstream projects of job completion

            Unassigned Unassigned
            dolsky Frantisek Dolsky
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: