Git 触发器jenkins基于隐藏请求构建

Git 触发器jenkins基于隐藏请求构建,git,jenkins,configuration,pull-request,bitbucket-server,Git,Jenkins,Configuration,Pull Request,Bitbucket Server,一段时间以来,我一直在按照通常的指导,努力让公共关系的基础发挥作用。但是我遇到了一些问题 以下是我添加到先前存在的@Jenkins项目配置中的内容: Source Code Management: Multiple SCMs - Repository URL: ssh://git@git.company.pt/projectCode/RepName.git - Credentials with ssh key working - Batches to build: */${sourceBr

一段时间以来,我一直在按照通常的指导,努力让公共关系的基础发挥作用。但是我遇到了一些问题

以下是我添加到先前存在的@Jenkins项目配置中的内容:

Source Code Management:
Multiple SCMs
 - Repository URL: ssh://git@git.company.pt/projectCode/RepName.git
 - Credentials with ssh key working
 - Batches to build: */${sourceBranch}
 - Repository browser: auto
 - Additional Behaviours: none

Build triggers:
 - Poll SCM
以及以前的工作生成和生成后操作

在隐藏端,没有太多的配置。下面是现有配置的ss及其测试结果@Settings->Hooks->Stash WebHook to Jenkins:

正如您在屏幕截图中所看到的,此配置的测试工作正常,它能够正确地向Jenkins发送消息。Jenkins通过以下日志消息接收:

Started on Apr 29, 2015 8:01:23 AM
Polling SCM changes on master
Using strategy: Default
using GIT_SSH to set credentials 
 > git --version # timeout=10
 > git -c core.askpass=true ls-remote -h ssh://git@git.fraunhofer.pt/glp/golivephone.git # timeout=10
Done. Took 0.18 sec
No changes
对,我什么都没改变! 问题是当我转到一个实际的分支并单击“触发构建”时。Git轮询日志保持不变,不会向Jenkins发送任何消息。我是否缺少@stash或分支创建中的一些配置步骤?我认为这与jenkins构建无关,因为我在触发构建时甚至没有收到池日志消息。 即使是一个调试的想法也会很好地发现问题所在

编辑:

触发生成时的网络活动被触发: 请求

与试验品相比:

Remote Address:10.211.8.19:443
Request URL:https://stash.fraunhofer.pt/rest/jenkins/latest/projects/projectCode/repos/repName/test
Request Method:POST
Status Code:200 OK

---PAYLOAD---
{jenkinsBase: ["http://i-255.cloud.fraunhofer.pt:8080/"],…}
gitRepoUrl: ["ssh://git@git.fraunhofer.pt/glp/golivephone.git"]
0: "ssh://git@git.fraunhofer.pt/glp/golivephone.git"
ignoreCerts: ["TRUE"]
0: "TRUE"
jenkinsBase: ["http://i-255.cloud.fraunhofer.pt:8080/"]
0: "http://i-255.cloud.fraunhofer.pt:8080/"
omitHashCode: ["TRUE"]
0: "TRUE"

---Query String parameter---
none
您可以看看我在哪里描述了如何设置Jenkins和Stash的详细步骤,以便在创建或更新pull请求时自动触发正确的Jenkins构建

它使用Jenkins Git插件和,并使用Jenkins Git插件的通知功能选择正确的版本。

您可以看看我在哪里描述了如何设置Jenkins和Stash,以便在创建或更新请求时自动触发正确的Jenkins版本的详细步骤


它使用Jenkins Git插件和,并使用Jenkins Git插件的通知功能选择正确的版本。

有人使用Git管道执行此操作吗?不是以前的jenkins单片作业?你说的“git管道”是什么意思?在jenkins 1.x中,这是他们过去称之为“git工作流”的东西。它现在是詹金斯2.x的一部分。我想它现在被称为Multibranch,但我正试图弄清楚如何让它为新的公关分支机构投票。有人使用git管道来做这件事吗?不是以前的jenkins单片作业?你说的“git管道”是什么意思?在jenkins 1.x中,这是他们过去称之为“git工作流”的东西。它现在是詹金斯2.x的一部分。我想它现在被称为多分支机构,但我正试图找出如何让它为新的公关分支机构投票。
Remote Address:10.211.8.19:443
Request URL:https://stash.fraunhofer.pt/rest/jenkins/latest/projects/projectCode/repos/repName/test
Request Method:POST
Status Code:200 OK

---PAYLOAD---
{jenkinsBase: ["http://i-255.cloud.fraunhofer.pt:8080/"],…}
gitRepoUrl: ["ssh://git@git.fraunhofer.pt/glp/golivephone.git"]
0: "ssh://git@git.fraunhofer.pt/glp/golivephone.git"
ignoreCerts: ["TRUE"]
0: "TRUE"
jenkinsBase: ["http://i-255.cloud.fraunhofer.pt:8080/"]
0: "http://i-255.cloud.fraunhofer.pt:8080/"
omitHashCode: ["TRUE"]
0: "TRUE"

---Query String parameter---
none