带有 list-git-branches-parameter-plugin 的 Jenkinsfile

Bra*_*der 2 plugins jenkins jenkins-pipeline

请帮助我将 jenkinsci/ list-git-branches-parameter-plugin合并到我的 jenkinsfile 中。我可以在构建/管道中创建,但我无法找到通过 jenkinsfile 使用此插件的任何示例。

Bra*_*der 7

通过猜测和检查得到了它。这是 jenkinsfile 的片段。

        listGitBranches(
            branchFilter: 'origin.*/(.*)',
            defaultValue: 'default',
            name: 'nameOfVariable',
            type: 'BRANCH',
            remoteURL: 'https://repo.url/repo.git',
            credentialsId: 'credID')
Run Code Online (Sandbox Code Playgroud)