为什么我的 Jenkins 停止响应通过 Webhooks 推送的 BitBucket?
Why has my Jenkins stopped responding to BitBucket pushes through Webhooks?
我们已将 Bitbucket 设置为在每次推送时调用 Jenkins (https://jenkins.MYORG.com/bitbucket-hook/)。它已经工作了很多年。然后在 2 月初,Jenkins 构建停止被触发。
Bitbucket 在通话中将每次推送注册为 200(截至 2021 年 2 月 18 日):
但 Jenkins 看到的最后一个 webhook 是 2021 年 2 月 3 日:
Started on Feb 3, 2021 2:50:53 PM
Using strategy: Default
[poll] Last Built Revision: Revision 77642d1711b318ce5429e6c532661cf74808b724 (refs/remotes/insight/develop)
using credential 6fdd775e-c5fb-4a52-9210-caa8a8bd6671
> C:\Program Files\Git\bin\git.exe --version # timeout=10
using GIT_ASKPASS to set credentials XXX Bitbucket Login
> C:\Program Files\Git\bin\git.exe ls-remote -h -- https://bitbucket.org/XXX/insight.git # timeout=10
Found 100 remote heads on https://bitbucket.org/XXX/insight.git
[poll] Latest remote head revision on refs/heads/develop is: 77642d1711b318ce5429e6c532661cf74808b724 - already built by 33
Done. Took 3.9 sec
No changes
Jenkins 分支设置为“*/develop”
提交正文(请询问是否有任何有用的内容)具有以下内容:
"new": {
"name": "develop",
"links": {
"commits": {
"href": "https://api.bitbucket.org/2.0/repositories/xxx/insight/commits/develop"
},
"self": {
"href": "https://api.bitbucket.org/2.0/repositories/xxx/insight/refs/branches/develop"
},
"html": {
"href": "https://bitbucket.org/xxx/insight/branch/develop"
}
},
所以他们似乎重合了。存储库 URL 直接转到 Bitbucket 中的存储库,凭据有效,触发器设置为“将更改推送到 BitBucket 时构建”。我完全不解。有人有什么想法吗?
谢谢,
麦克
问题是我们的 StackPath 没有 Bitbucket 的所有 IP 范围,所以当它切换时,我们阻止了推送。
我们已将 Bitbucket 设置为在每次推送时调用 Jenkins (https://jenkins.MYORG.com/bitbucket-hook/)。它已经工作了很多年。然后在 2 月初,Jenkins 构建停止被触发。
Bitbucket 在通话中将每次推送注册为 200(截至 2021 年 2 月 18 日):
但 Jenkins 看到的最后一个 webhook 是 2021 年 2 月 3 日:
Started on Feb 3, 2021 2:50:53 PM
Using strategy: Default
[poll] Last Built Revision: Revision 77642d1711b318ce5429e6c532661cf74808b724 (refs/remotes/insight/develop)
using credential 6fdd775e-c5fb-4a52-9210-caa8a8bd6671
> C:\Program Files\Git\bin\git.exe --version # timeout=10
using GIT_ASKPASS to set credentials XXX Bitbucket Login
> C:\Program Files\Git\bin\git.exe ls-remote -h -- https://bitbucket.org/XXX/insight.git # timeout=10
Found 100 remote heads on https://bitbucket.org/XXX/insight.git
[poll] Latest remote head revision on refs/heads/develop is: 77642d1711b318ce5429e6c532661cf74808b724 - already built by 33
Done. Took 3.9 sec
No changes
Jenkins 分支设置为“*/develop”
提交正文(请询问是否有任何有用的内容)具有以下内容:
"new": {
"name": "develop",
"links": {
"commits": {
"href": "https://api.bitbucket.org/2.0/repositories/xxx/insight/commits/develop"
},
"self": {
"href": "https://api.bitbucket.org/2.0/repositories/xxx/insight/refs/branches/develop"
},
"html": {
"href": "https://bitbucket.org/xxx/insight/branch/develop"
}
},
所以他们似乎重合了。存储库 URL 直接转到 Bitbucket 中的存储库,凭据有效,触发器设置为“将更改推送到 BitBucket 时构建”。我完全不解。有人有什么想法吗?
谢谢, 麦克
问题是我们的 StackPath 没有 Bitbucket 的所有 IP 范围,所以当它切换时,我们阻止了推送。