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,110 points
214 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
• 40,460 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 by Sirajul
• 25,700 points

Related Questions In Jenkins

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 in Jenkins by Sirajul
• 25,700 points
1,466 views
0 votes
2 answers

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

If you are talking about executing another ...READ MORE

answered Jul 31 in Jenkins by Sirajul
• 25,700 points
4,304 views
0 votes
2 answers

Error Jenkins: Failed to connect to repository

Jenkins runs as another user, not as ...READ MORE

answered Aug 7 in Jenkins by Sirajul
• 25,700 points
583 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,380 points
152 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
• 40,460 points
63 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 in Jenkins by Sirajul
• 25,700 points
144 views