[Wed Nov 22 10:22:18 PST 2017] Received com.cloudbees.jenkins.plugins.bitbucket.hooks.PushHookProcessor$1 UPDATED event from 127.0.0.1 ⇒ http://localhost:8080/jenkins/bitbucket-scmsource-hook/notify with timestamp Wed Nov 22 10:22:18 PST 2017 Connecting to http://localhost:7990 using admin/****** (admin) Repository type: Git Looking up OP/ovn2 for branches Checking branch test_web_hook from OP/ovn2 Checking branch master from OP/ovn2 2 branches were processed Looking up OP/ovn2 for pull requests Checking PR-1 from OP/ovn2 and branch test_web_hook 1 pull requests were processed [Wed Nov 22 10:24:12 PST 2017] com.cloudbees.jenkins.plugins.bitbucket.hooks.PushHookProcessor$1 UPDATED event from 127.0.0.1 ⇒ http://localhost:8080/jenkins/bitbucket-scmsource-hook/notify with timestamp Wed Nov 22 10:22:18 PST 2017 processed in 1 min 53 sec
git push --set-upstream origin webhook1
{"actor":{"username":"admin","displayName":"admin"},"repository":{"scmId":"git","project":{"key":"OP","name":"Open VisaNet"},"slug":"ovn2","links":{"self":[{"href":"http://localhost:7990/projects/OP/repos/ovn2/browse"}]},"public":false,"fullName":"OP/ovn2","owner":{"username":"OP","displayName":"OP"},"ownerName":"OP"},"push":{"changes":[{"created":true,"closed":false,"new":{"type":"branch","name":"webhook","target":{"type":"commit","hash":"9cc7446788a3e66d29a69e67cdc0ee3a519535d5"}},"old":null}]}}
https://github.com/Eernie/bitbucket-webhooks-plugin/issues/72
if(event instanceof BitbucketPushEvent && pushEventService.isValidEvent((BitbucketPushEvent) event, webHookConfiguration))
{ try (CloseableHttpResponse response = httpClient.execute(post)) { int statusCode = response.getStatusLine().getStatusCode(); if (statusCode >= 400) { LOGGER.error( "[repo: {}]| Something went wrong while posting (response code:{}) the following body to webhook: [{}({})] \n{}", repo, statusCode, webHookConfiguration.getTitle(), webHookConfiguration.getURL(), body); } } catch (IOException e) { LOGGER.error( "[repo: {}]| Something went wrong while posting the following body to webhook: [{}({})] \n{}", repo, webHookConfiguration.getTitle(), webHookConfiguration.getURL(), body, e); } }