简体   繁体   English

Jenkins 多分支管道未检测到 Bitbucket 服务器中的拉取请求

[英]Jenkins multibranch pipeline does not detect pull requests in Bitbucket server

I am having trouble getting Jenkins multibranch pipeline detect pull requests created in the Bitbucket server (private instance).我无法让 Jenkins 多分支管道检测在 Bitbucket 服务器(私有实例)中创建的拉取请求。 I have setup the "Bitbucket server webhook to Jenkins" which is triggering the build on master, develop and feature branches except pull-requests.我已经设置了“Bitbucket server webhook to Jenkins”,它触发了在 master、develop 和 feature 分支上的构建,除了 pull-requests。 I have defined the build steps in Jenkisfile and can confirm the PR branch also includes the Jenkinsfile.我已经在 J​​enkisfile 中定义了构建步骤,并且可以确认 PR 分支也包括 Jenkinsfile。 In the Jenkins configuration, I have enabled "Discover branches" under Branch Sources configuration在 Jenkins 配置中,我在 Branch Sources 配置下启用了“发现分支”

Pull Request isn't a branch, it is usually something that is done prior to publishing to a branch. Pull Request 不是分支,它通常是在发布到分支之前完成的事情。 Usually, the pull request is approved, then published to the master branch.通常,拉取请求被批准,然后发布到主分支。

Ok.好的。 After multiple trial and error and google search, I have managed to get the Jenkins Multibranch pipeline work with Bitbucket server.经过多次反复试验和谷歌搜索,我设法让 Jenkins Multibranch 管道与 Bitbucket 服务器一起工作。 The key was to use 'Bitbucket' (from bitbucket branch source plugin) as the Branch source.关键是使用'Bitbucket'(来自bitbucket 分支源插件)作为分支源。 Also, I had to include a dummy trigger in my Jenkinsfile for the Jenkins webhook to work from bitbucket此外,我必须在我的 Jenkinsfile 中包含一个虚拟触发器,以便 Jenkins webhook 从 bitbucket 工作

triggers { bitbucketPush() pollSCM('0 0 1 1 0') }

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在 jenkins Multibranch Pipeline 中发现 azure devops pull request - How to discover azure devops pull requests in jenkins Multibranch Pipeline Jenkins 多分支管道拉取请求 - Jenkins Multibranch pipeline pull request Multibranch管道作业未显示打开拉取请求 - Multibranch pipeline job not showing open pull requests Jenkins 多分支管道 - 创建 PullRequest 时不会从 Bitbucket 触发扫描 - Jenkins Multibranch Pipeline - scan is not triggered from Bitbucket when a PullRequest is created 在 Jenkins 中,多分支管道是否支持 Git 标签? - In Jenkins, does a multibranch pipeline support Git tags? 在拉取请求 jenkins 多分支管道的情况下获取分支名称 - Get branch name in case of pull request jenkins multibranch pipeline jenkins 多分支管道作业 github 拉取请求生成器配置错误 - jenkins multibranch pipeline job github pull request builder configuration error 在GitHub中创建拉取请求时触发Jenkins Multibranch管道 - Triggering Jenkins Multibranch pipeline when there is a pull request created in GitHub Jenkins 管道确定分支是否用于 Bitbucket 拉取请求 - Jenkins pipeline determine if a branch is for Bitbucket pull request Jenkins根据Bitbucket拉取请求进行声明的管道 - Jenkins declarative pipeline upon Bitbucket pull request
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM