git - 为什么我的 Jenkins 停止通过 Webhooks 响应 BitBucket 推送?
问题描述
我们设置了 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 范围,所以当它切换时,我们阻止了推送。
推荐阅读
- flutter - Flutter Textfield 带间距的换行文本
- django - 如何用 django 加入 3 tbales?
- r - 如何计算R中多列的出现次数
- angular - Git 在运行 ng build --prod 后没有说什么要提交
- docker - FireflyIII 的流量路由
- reactjs - react-google-login 清除我的应用程序中的 cookie/会话信息
- r - 根据第一列中所述行的条目确定矩阵中每一行的长度
- linux - 奇点:如何释放循环设备?
- angular - 最初处理 QueryList 更改
- swift - AudioKit:虚拟 MIDI 端口混乱?