Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
Level
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to get webhook working with Bitbucket Server and Jenkins

Simple setup on a couple of VMs for testing/learning.

vm1. Jenkins 2.176.3-1.1 on CentOs 7.6. 
vm2. Bitbucket Server on Centos 7.6

I have created a repo in Bitbucket server and I have created a build (simple test) and Jenkins does connect to Bitbucket and pull down the repo.  So the Jenkins to Bitbucket build piece appears to be working.

I want to configure a webhook so that the build triggers on a push to the repo.

So I have installed:

Bitbucket Plugin Installed in Jenkins https://wiki.jenkins.io/display/JENKINS/BitBucket+Plugin

Post Webhooks For Bitbucket plugin installed in BitBucket Server https://marketplace.atlassian.com/apps/1215474/post-webhooks-for-bitbucket?hosting=server&tab=overview

Follow along to the instructions here

https://confluence.atlassian.com/bitbucketserver065/managing-webhooks-in-bitbucket-server-976162856.html

and here https://wiki.jenkins.io/display/JENKINS/BitBucket+Plugin

In my bitbucket server repo

Repository settings > Webhooks > Create Webhook

Name: webhook
URL: http://vm1:8080/job/train-schedule/bitbucket-hook/

Click Test and get

403 - "No valid crumb was included in the request"

I suspect something is wromg with the URL value. Anyone know how to fix?

1 answer

I have encountered this. I fixed it by doing something like this:

http://vm1:8080/bitbucket-hook/

Or if it still doesn't work

http://vm1/bitbucket-hook/

 

My Jenkins was behind a load balancer so I'm not sure which of the two will work.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

Calling any interview participants for Bitbucket Data Center

Hi everyone,  We are looking to learn more about development teams’ workflows and pain points, especially around DevOps, integrations, administration, scale, security, and the related challeng...

499 views 6 4
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you