无法播种具有 BbS SCM 步骤的管道作业

Unable to seed a pipeline job which has the BbS SCM step

当用 Bbs SCM 步骤替换 groovy 中的 git SCM 步骤时无法播种管道作业并收到以下错误

Build Error: [hudson.AbortException: (job.groovy, line 50) No signature of method: javaposse.jobdsl.dsl.helpers.ScmContext.Bbs() is applicable for argument types: (<git-folder>$_run_closure1$_closure4$_closure6$_closure7$_closure8) values: [<git-folder>$_run_closure1$_closure4$_closure6$_closure7$_closure8@71df7e4c] Possible solutions: is(java.lang.Object), any(), git(groovy.lang.Closure), git(java.lang.String), hg(java.lang.String), rtc(groovy.lang.Closure)]

使用 Jenkins UI 编辑作业并更新所有适当的字段时,一切正常。只是种子作业无法读取 groovy 文件来创建作业。

下面是我的 groovy SCM 步骤代码:

definition {
   cpsScm {
         scm {
             Bbs {
                 id('id')
                 branches {
                     branchSpec {
                         name('test')
                     }
                 }
                credentialsId('user')
                gitTool(null)
                mirrorName('')
                projectName('Proj')
                repositoryName('Repo')
                serverId('12345')
             }
         scriptPath(jenkinsfile)
        }
    }   
}

请advice/assist解决这个问题。

问题已解决。请参考决议here