Jenkins hook does not appear to be firing

Phoenix Zerin August 27, 2013

I have configured a Jenkins hook for a Bitbucket repo, and the configuration appears to be correct — when I reconstruct the URL it should be hitting using the values in the configuration, it fires off a Jenkins build.

I.e., When I hit `<endpoint>/job/<project name>/build?token=<token>` in my browser, it correctly triggers a build.

Here are the troubleshooting steps I have taken to try to resolve this issue:

X 0. Configured Jenkins commit hook.
√ 1. Added another commit hook (email diff) to verify that commit hooks are firing.
√ 2. Manually hit build URL with my browser to verify that Jenkins is configured correctly.
√ 3. Connected to VPN and hit build URL with my browser to verify that it is not a firewall issue.
√ 4. Created a POST hook that hits http://posttestserver.com/post.php.
X 5. Changed hook type from Jenkins to POST and entered correct build URL.

Takeaways:

  1. Commit hooks are generally working. Email diff hook fires correctly.
  2. I'm providing the correct parameters to the Jenkins/POST hooks — the resulting URL is correct.
  3. It doesn't appear to be a firewall issue; I can access the server from a (relatively) random server; iptables is allowing all traffic on port 8080.
  4. The test POST did work.
  5. It doesn't seem to be a configuration issue with the Bitbucket repo — even if I directly specify a URL for a POST hook, nothing shows up in Jenkins's log.

2 answers

1 accepted

Suggest an answer

Log in or Sign up to answer
0 votes
Answer accepted
Phoenix Zerin September 8, 2013

Atlassian support checked it out, and it turns out that Jenkins is sending back a 403. I tried it out in another browser, and sure enough, even though I'm sending a token value, Jenkins is still showing the login page.

The next step will be to get Jenkins to allow a ping to the build URL (with appropriate token value) without requiring login.

1 vote
m
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 28, 2013

Hi Phoenix,

We have a page for that in the documentation:

https://confluence.atlassian.com/display/BITBUCKET/Troubleshoot+Bitbucket+hooks

Phoenix Zerin September 1, 2013

Thanks manthony. I tried the troubleshooting steps on that page but still was not able to get the hook to fire. I have updated my question with additional information.

Phoenix Zerin September 1, 2013

Hi manthony. Thanks for the information. I tried the troubleshooting steps on that page, but I was still unable to resolve the issue. I have updated my OP with my troubleshooting steps.

TAGS
AUG Leaders

Atlassian Community Events