Jenkins hook does not appear to be firing

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

0 votes
Accepted answer

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.

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.

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.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Dec 07, 2018 in Off-topic

Friday Fun: Dry T-Shirt Competition - What's your BEST (Atlassian) T-Shirt!?

[Note: So it was my turn for Friday Fun and sadly I was sick thanks to rubbish sinus infection... so apologies to most of Europe and Asia for the delayed post. However, I finally got out of bed for t...

372 views 27 4
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you