Jenkins:如何在管道项目中使用bitbucket pull request builder插件?

时间:2017-04-20 14:36:49

标签: jenkins jenkins-pipeline

我可以从维基看到bitbucket pull request builder插件支持jenkins管道项目。但是,我找不到任何关于如何使用它的例子。在片段生成器下拉列表中,我找不到该选项。有人可以分享一个如何使用插件从Jenkins管道项目构建拉取请求的示例吗?

1 个答案:

答案 0 :(得分:0)

pipeline {
    agent any
    triggers{
        bitbucketpr(projectPath:'<BIT_BUCKET_PATH>',
        cron:'H/15 * * * *',
        credentialsId:'',
        username:'',
        password:'',
        repositoryOwner:'',
        repositoryName:'',
        branchesFilter:'',
        branchesFilterBySCMIncludes:false,
        ciKey:'',
        ciName:'',
        ciSkipPhrases:'',
        checkDestinationCommit:false,
        approveIfSuccess:false,
        cancelOutdatedJobs:true,
        commentTrigger:'')
    }
}

设置Jenkins管道后,首次手动运行作业(否则触发器可能无效!)

https://github.com/jenkinsci/bitbucket-pullrequest-builder-plugin