Jenkins管道不是由Bitbucket Server push/PR触发的,但freestyle项目可以

7jmck4yq  于 2023-10-17  发布在  Jenkins
关注(0)|答案(1)|浏览(115)

我正在配置一个Jenkins设置,每次在Bitbucket服务器存储库上发出推或拉请求时,都应该触发一个管道。有趣的是,这个设置可以无缝地用于自由式项目,但它似乎不能激活管道项目。
以下是我的配置:

*Jenkins版本:2.427
*Bitbucket服务器:8.14.1

外挂程序:

*Bitbucket Push和Pull请求:2.8.4
**Git plugin:5.2.0

在我的配置中,我选择的唯一选项显示在此screenshot中。对于源代码管理(SCM),我使用Git。当我测试连接时,我收到以下消息:
Jenkins成功连接到主服务器上的bitbucket-managed的jenkins/sample
Bitbucket端的webhook也设置正确,我已经确认它在访问自定义端点时返回200 OK状态。
然而,这里有一个异常:当我尝试将变更从临时分支合并到主分支时,它会触发一个自由式项目,但不会触发管道项目。
这是我目前在Jenkins日志中发现的

如您所见,webhook本身确实触发了


Bitbucket

2023-10-11 08:08:08,438 DEBUG [http-nio-7990-exec-5] admin @Y7JMOKx488x3198x0 hxbgmf 10.212.134.101 "POST /rest/api/latest/projects/JENKINS/repos/jenkins/pull-requests HTTP/1.1" c.a.s.i.p.InternalPullRequestCommitHelper Indexing: linking PR 3070 with 26 commit(s) using include: 6c880405f0d63e97b54d3ce080bba38383618e03
2023-10-11 08:08:08,484 DEBUG [http-nio-7990-exec-5] admin @Y7JMOKx488x3198x0 hxbgmf 10.212.134.101 "POST /rest/api/latest/projects/JENKINS/repos/jenkins/pull-requests HTTP/1.1" c.a.s.i.e.TransactionAwareEventPublisher Deferring publishing for WatcherAddedEvent until AFTER_COMMIT
2023-10-11 08:08:08,484 DEBUG [http-nio-7990-exec-5] admin @Y7JMOKx488x3198x0 hxbgmf 10.212.134.101 "POST /rest/api/latest/projects/JENKINS/repos/jenkins/pull-requests HTTP/1.1" c.a.s.i.e.TransactionAwareEventPublisher Deferring publishing for PullRequestActivityEvent until AFTER_COMMIT
2023-10-11 08:08:08,484 DEBUG [http-nio-7990-exec-5] admin @Y7JMOKx488x3198x0 hxbgmf 10.212.134.101 "POST /rest/api/latest/projects/JENKINS/repos/jenkins/pull-requests HTTP/1.1" c.a.s.i.e.TransactionAwareEventPublisher Deferring publishing for AnalyticsPullRequestOpenedEvent until AFTER_COMMIT
2023-10-11 08:08:08,532 DEBUG [http-nio-7990-exec-5] admin @Y7JMOKx488x3198x0 hxbgmf 10.212.134.101 "POST /rest/api/latest/projects/JENKINS/repos/jenkins/pull-requests HTTP/1.1" c.a.s.i.e.TransactionAwareEventPublisher Publishing WatcherAddedEvent after commit
2023-10-11 08:08:08,532 DEBUG [http-nio-7990-exec-5] admin @Y7JMOKx488x3198x0 hxbgmf 10.212.134.101 "POST /rest/api/latest/projects/JENKINS/repos/jenkins/pull-requests HTTP/1.1" c.a.s.i.e.TransactionAwareEventPublisher Publishing PullRequestActivityEvent after commit
2023-10-11 08:08:08,532 DEBUG [http-nio-7990-exec-5] admin @Y7JMOKx488x3198x0 hxbgmf 10.212.134.101 "POST /rest/api/latest/projects/JENKINS/repos/jenkins/pull-requests HTTP/1.1" c.a.s.i.e.TransactionAwareEventPublisher Publishing AnalyticsPullRequestOpenedEvent after commit
2023-10-11 08:08:08,533 DEBUG [threadpool:thread-2] admin @Y7JMOKx488x3198x0 hxbgmf 10.212.134.101 "POST /rest/api/latest/projects/JENKINS/repos/jenkins/pull-requests HTTP/1.1" c.a.s.i.n.DefaultNotificationManager Managing notification: PullRequestActivityNotification{admin=InternalNormaladmin{id=753, adminname=admin}, timestamp=Wed Oct 11 08:08:08 IDT 2023, pullRequest=jenkins:9, activity=InternalPullRequestActivity{id=66284, admin=InternalNormaladmin{id=753, adminname=admin}, action=OPENED, pullRequest.id=9}}
2023-10-11 08:08:08,533 DEBUG [AtlassianEvent::thread-3] admin @Y7JMOKx488x3198x0 hxbgmf 10.212.134.101 "POST /rest/api/latest/projects/JENKINS/repos/jenkins/pull-requests HTTP/1.1" c.a.e.r.impl.RemoteEventListener Queueing RemoteEvent com.atlassian.stash.plugin.remote.event.StashPullRequestOpenedRemoteEvent@c9decd7[fromBranch=refs/heads/main,fromProjectKey=JENKINS,fromRepositorySlug=jenkins,id=9,toBranch=refs/heads/master,toProjectKey=JENKINS,toRepositorySlug=jenkins,sourceId=<null>,sourceUrl=<null>]
2023-10-11 08:08:08,533 DEBUG [threadpool:thread-1] admin @Y7JMOKx488x3198x0 hxbgmf 10.212.134.101 "POST /rest/api/latest/projects/JENKINS/repos/jenkins/pull-requests HTTP/1.1" c.a.s.i.n.DefaultNotificationManager Managing notification: PullRequestOpenedNotification{admin=InternalNormaladmin{id=753, adminname=admin}, timestamp=Wed Oct 11 08:08:08 IDT 2023, pullRequest=jenkins:9}
2023-10-11 08:08:08,534 DEBUG [AtlassianEvent::thread-3] admin @Y7JMOKx488x3198x0 hxbgmf 10.212.134.101 "POST /rest/api/latest/projects/JENKINS/repos/jenkins/pull-requests HTTP/1.1" c.a.e.r.impl.RemoteEventDispatcher RemoteEvent com.atlassian.stash.plugin.remote.event.StashPullRequestOpenedRemoteEvent@c9decd7[fromBranch=refs/heads/main,fromProjectKey=JENKINS,fromRepositorySlug=jenkins,id=9,toBranch=refs/heads/master,toProjectKey=JENKINS,toRepositorySlug=jenkins,sourceId=<null>,sourceUrl=<null>] consumable by []
2023-10-11 08:08:08,534 DEBUG [AtlassianEvent::thread-3] admin @Y7JMOKx488x3198x0 hxbgmf 10.212.134.101 "POST /rest/api/latest/projects/JENKINS/repos/jenkins/pull-requests HTTP/1.1" c.a.e.r.impl.RemoteEventListener Batch size not exceeded for com.atlassian.stash.plugin.remote.event.StashPullRequestOpenedRemoteEvent@c9decd7[fromBranch=refs/heads/main,fromProjectKey=JENKINS,fromRepositorySlug=jenkins,id=9,toBranch=refs/heads/master,toProjectKey=JENKINS,toRepositorySlug=jenkins,sourceId=<null>,sourceUrl=<null>]
2023-10-11 08:08:08,534 INFO  [moveworkforward-bitbucket-1] admin @Y7JMOKx488x3198x0 hxbgmf 10.212.134.101 "POST /rest/api/latest/projects/JENKINS/repos/jenkins/pull-requests HTTP/1.1" c.m.b.listener.AbstractEventListener Creating Event for: com.atlassian.stash.internal.pull.AnalyticsPullRequestOpenedEvent[source=com.atlassian.stash.internal.pull.DefaultPullRequestService@2bad091d]
2023-10-11 08:08:08,535 INFO  [moveworkforward-bitbucket-1] admin @Y7JMOKx488x3198x0 hxbgmf 10.212.134.101 "POST /rest/api/latest/projects/JENKINS/repos/jenkins/pull-requests HTTP/1.1" n.t.bitbucket.service.LicenseManager Plugin licensed.
2023-10-11 08:08:08,535 INFO  [moveworkforward-bitbucket-1] admin @Y7JMOKx488x3198x0 hxbgmf 10.212.134.101 "POST /rest/api/latest/projects/JENKINS/repos/jenkins/pull-requests HTTP/1.1" n.t.b.processor.AbstractProcessor isEventAccepted for event type: PULL_REQUEST_OPENED, and result is true, class : PullRequestProcessor
2023-10-11 08:08:08,535 INFO  [moveworkforward-bitbucket-1] admin @Y7JMOKx488x3198x0 hxbgmf 10.212.134.101 "POST /rest/api/latest/projects/JENKINS/repos/jenkins/pull-requests HTTP/1.1" n.t.b.processor.PullRequestProcessor isEventAccepted for event type: PULL_REQUEST_OPENED
2023-10-11 08:08:08,535 INFO  [moveworkforward-bitbucket-1] admin @Y7JMOKx488x3198x0 hxbgmf 10.212.134.101 "POST /rest/api/latest/projects/JENKINS/repos/jenkins/pull-requests HTTP/1.1" n.t.b.processor.PullRequestProcessor isEventAccepted result: true
2023-10-11 08:08:08,535 INFO  [moveworkforward-bitbucket-1] admin @Y7JMOKx488x3198x0 hxbgmf 10.212.134.101 "POST /rest/api/latest/projects/JENKINS/repos/jenkins/pull-requests HTTP/1.1" c.m.b.listener.AbstractEventListener nl.topicus.bitbucket.processor.PullRequestProcessor accepted event by type: PULL_REQUEST_OPENED
2023-10-11 08:08:08,535 INFO  [moveworkforward-bitbucket-1] admin @Y7JMOKx488x3198x0 hxbgmf 10.212.134.101 "POST /rest/api/latest/projects/JENKINS/repos/jenkins/pull-requests HTTP/1.1" n.t.b.processor.PullRequestProcessor Processing event with type: PULL_REQUEST_OPENED
2023-10-11 08:08:08,535 INFO  [moveworkforward-bitbucket-1] admin @Y7JMOKx488x3198x0 hxbgmf 10.212.134.101 "POST /rest/api/latest/projects/JENKINS/repos/jenkins/pull-requests HTTP/1.1" n.t.b.processor.PullRequestProcessor sendPullRequestEvent: PULL_REQUEST_OPENED
2023-10-11 08:08:08,614 DEBUG [moveworkforward-bitbucket-1] admin @Y7JMOKx488x3198x0 hxbgmf 10.212.134.101 "POST /rest/api/latest/projects/JENKINS/repos/jenkins/pull-requests HTTP/1.1" c.a.s.i.s.g.m.MeshPullRequestRefHelper JENKINS/jenkins[203]: Pull request 9@0 merged automatically without conflicts
2023-10-11 08:08:08,627 INFO  [moveworkforward-bitbucket-1] admin @Y7JMOKx488x3198x0 hxbgmf 10.212.134.101 "POST /rest/api/latest/projects/JENKINS/repos/jenkins/pull-requests HTTP/1.1" n.t.b.processor.PullRequestProcessor sendPullRequestEvent prUrl: http://192.168.200.23:7990/projects/JENKINS/repos/jenkins/pull-requests/9
2023-10-11 08:08:08,627 INFO  [moveworkforward-bitbucket-1] admin @Y7JMOKx488x3198x0 hxbgmf 10.212.134.101 "POST /rest/api/latest/projects/JENKINS/repos/jenkins/pull-requests HTTP/1.1" n.t.b.processor.AbstractProcessor sendEvents event type: PULL_REQUEST_OPENED
2023-10-11 08:08:08,628 INFO  [moveworkforward-bitbucket-1] admin @Y7JMOKx488x3198x0 hxbgmf 10.212.134.101 "POST /rest/api/latest/projects/JENKINS/repos/jenkins/pull-requests HTTP/1.1" n.t.b.processor.AbstractProcessor sendEvents getting configuration for repo: 203
2023-10-11 08:08:08,629 INFO  [moveworkforward-bitbucket-1] admin @Y7JMOKx488x3198x0 hxbgmf 10.212.134.101 "POST /rest/api/latest/projects/JENKINS/repos/jenkins/pull-requests HTTP/1.1" n.t.b.s.WebhookConfigurationService Always add project configurations: false
2023-10-11 08:08:08,629 INFO  [moveworkforward-bitbucket-1] admin @Y7JMOKx488x3198x0 hxbgmf 10.212.134.101 "POST /rest/api/latest/projects/JENKINS/repos/jenkins/pull-requests HTTP/1.1" n.t.b.s.WebhookConfigurationService Always add global configurations: false
2023-10-11 08:08:08,629 INFO  [moveworkforward-bitbucket-1] admin @Y7JMOKx488x3198x0 hxbgmf 10.212.134.101 "POST /rest/api/latest/projects/JENKINS/repos/jenkins/pull-requests HTTP/1.1" n.t.b.processor.AbstractProcessor sendEvents enabledWebHookConfigurations count: 0
2023-10-11 08:08:08,629 INFO  [moveworkforward-bitbucket-1] admin @Y7JMOKx488x3198x0 hxbgmf 10.212.134.101 "POST /rest/api/latest/projects/JENKINS/repos/jenkins/pull-requests HTTP/1.1" n.t.bitbucket.service.LicenseManager Plugin licensed.
2023-10-11 08:08:08,629 INFO  [moveworkforward-bitbucket-1] admin @Y7JMOKx488x3198x0 hxbgmf 10.212.134.101 "POST /rest/api/latest/projects/JENKINS/repos/jenkins/pull-requests HTTP/1.1" n.t.b.processor.AbstractProcessor isEventAccepted for event type: PULL_REQUEST_OPENED, and result is false, class : RepositoryRefsChangedProcessor
2023-10-11 08:08:08,629 INFO  [moveworkforward-bitbucket-1] admin @Y7JMOKx488x3198x0 hxbgmf 10.212.134.101 "POST /rest/api/latest/projects/JENKINS/repos/jenkins/pull-requests HTTP/1.1" n.t.bitbucket.service.LicenseManager Plugin licensed.
2023-10-11 08:08:08,629 INFO  [moveworkforward-bitbucket-1] admin @Y7JMOKx488x3198x0 hxbgmf 10.212.134.101 "POST /rest/api/latest/projects/JENKINS/repos/jenkins/pull-requests HTTP/1.1" n.t.b.processor.AbstractProcessor isEventAccepted for event type: PULL_REQUEST_OPENED, and result is false, class : BuildStatusSetProcessor
2023-10-11 08:08:08,629 INFO  [moveworkforward-bitbucket-1] admin @Y7JMOKx488x3198x0 hxbgmf 10.212.134.101 "POST /rest/api/latest/projects/JENKINS/repos/jenkins/pull-requests HTTP/1.1" n.t.b.p.ProjectRepositoryModificationProcessor Event PULL_REQUEST_OPENED accepted: false
2023-10-11 08:08:08,629 INFO  [moveworkforward-bitbucket-1] admin @Y7JMOKx488x3198x0 hxbgmf 10.212.134.101 "POST /rest/api/latest/projects/JENKINS/repos/jenkins/pull-requests HTTP/1.1" n.t.bitbucket.service.LicenseManager Plugin licensed.
2023-10-11 08:08:08,629 INFO  [moveworkforward-bitbucket-1] admin @Y7JMOKx488x3198x0 hxbgmf 10.212.134.101 "POST /rest/api/latest/projects/JENKINS/repos/jenkins/pull-requests HTTP/1.1" n.t.b.processor.AbstractProcessor isEventAccepted for event type: PULL_REQUEST_OPENED, and result is false, class : RepositoryMirrorSynchronizedProcessor
2023-10-11 08:08:09,302 DEBUG [http-nio-7990-exec-6] admin @Y7JMOKx488x3200x0 hxbgmf 10.212.134.101 "GET /projects/JENKINS/repos/jenkins/pull-requests/9/overview HTTP/1.1" c.a.s.i.p.w.f.RequestCacheClientPageDataHandler Context bitbucket.web.repository.clone.dialog.options was required already. Ignoring.
2023-10-11 08:08:10,225 DEBUG [http-nio-7990-exec-7] admin @Y7JMOKx488x3205x1 hxbgmf 10.212.134.101 "GET /rest/client-plugins/1.0/client-plugins/items HTTP/1.1" c.a.s.i.i18n.PluginI18nService No values found in any valid locale for key  and locales [en_US, en]
2023-10-11 08:08:10,508 DEBUG [http-nio-7990-exec-2] admin @Y7JMOKx488x3211x0 hxbgmf 10.212.134.101 "GET /rest/api/latest/projects/JENKINS/repos/jenkins/pull-requests/9/activities HTTP/1.1" c.a.s.i.p.c.d.DriftCommentUpdateProcessor 203:9@0: No rescopes are pending drift
2023-10-11 08:08:10,512 DEBUG [http-nio-7990-exec-4] admin @Y7JMOKx488x3213x2 hx

有没有人遇到过类似的问题,或者对如何解决这个问题有什么建议?

mefy6pfw

mefy6pfw1#

此插件需要安全连接。
即通过端口443。

向我的Bitbucket服务器颁发证书已解决此问题。

相关问题