How to connect Bitbucket to Jenkins properly

0 votes
Bitbucket doesn't send a request to my Jenkins server.

I've set it all up like this:

Endpoint http://username:apitoken@jenkinshost/
username = username in Jenkins
apitoken = apitoken connected to the username in Jenkins
jenkinshost = my host where I run Jenkins

Project name is a project
Token: The token I can setup in the per-project configuration.

Initially it was working but then it stopped.
Aug 9, 2018 in Jenkins by lina
• 8,220 points
2,601 views

2 answers to this question.

0 votes

Follow these steps

  1. Generate a custom UUID or string sequence, save for later
  2. Jenkins -> Configure Project -> Build Triggers -> "Trigger builds remotely (e.g., from scripts)"
  3. (Paste UUID/string Here) for "Authentication Token"
  4. Save
  5. Edit bitbucket repository settings
  6. Hooks -> Edit: Endpoint: http://jenkins.something.co:9009/ Module Name: Project Name: Project Name Token: (Paste UUID/string Here)
answered Aug 9, 2018 by Kalgi
• 52,350 points
0 votes

In order to build your repo after new commits, use BitBucket Plugin.

There is just one thing to notice: When creating a POST Hook (notice that it is POST hook, not Jenkins hook), the URL works when it has a "/" in the end. Like:

URL: JENKINS_URL/bitbucket-hook/
e.g. someAddress:8080/bitbucket-hook/

Do not forget to check "Build when a change is pushed to BitBucket" in your job configuration.

answered Aug 8, 2019 by Sirajul
• 59,230 points

Related Questions In Jenkins

0 votes
1 answer

How to integrate bitbucket with Jenkins ?

You need to use the Bitbucket plugin ...READ MORE

answered Feb 11, 2020 in Jenkins by anonymous
• 59,230 points
1,304 views
0 votes
2 answers
0 votes
2 answers

How to start Jenkins on a different port rather than 8080?

This is simple, use the following command: java ...READ MORE

answered Jul 4, 2018 in Jenkins by Sophie may
• 10,620 points
35,837 views
+5 votes
3 answers

How to trigger a Jenkins pipeline A in another Jenkins pipeline B?

You can run the following code, its ...READ MORE

answered Jul 5, 2018 in Jenkins by Sophie may
• 10,620 points
119,656 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,038 views
+2 votes
1 answer
0 votes
1 answer

How to serve Jenkins with Caddy?

Using the transparent preset fixes this: jenkins.example.com { ...READ MORE

answered Aug 8, 2018 in Jenkins by Kalgi
• 52,350 points
1,537 views
0 votes
3 answers

How can I make Jenkins CI with Git trigger on pushes to master?

To automatically run build on code commit, follow ...READ MORE

answered Aug 7, 2019 in Jenkins by Sirajul
• 59,230 points
4,971 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP