JobDSL folderLibraries is failing after git plugin upgrade to 4.8.1

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      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

            Assignee:
            Unassigned
            Reporter:
            Frantisek Dolsky
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: