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,200 points
522 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
• 51,850 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
• 53,080 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 in Jenkins by anonymous
• 53,080 points
92 views
0 votes
2 answers
0 votes
2 answers

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

In case you want to change the ...READ MORE

answered Jul 31, 2019 in Jenkins by Sirajul
• 53,080 points
7,083 views
+2 votes
2 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
• 9,940 points
18,997 views
+13 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 26, 2018 in DevOps & Agile by DragonLord999
• 8,400 points
495 views
0 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
• 51,850 points
220 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
• 53,080 points
1,206 views