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
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?
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.
Validate your expertise in managing Jira Service Projects for Cloud. Master configuration, optimize workflows, and manage users seamlessly. Earn global 🗺️ recognition and advance your career as a trusted Jira Service management expert.
Get Certified! ✍️Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.