Jenkins hook not working

0 votes

I’m using Jenkins with bitbucket. I want a build to be triggered every time I commit anything to bitbucket repo.

In Jenkins

I’ve created a job called dusted

Iin configure section Build Triggers part I ticked Trigger builds remotely

I added a token TEST_TOKEN

http://test.com:8080/job/test_1//build?token=TEST_TOKEN

Build is triggered

In bitbucket

I’ve added a jenkins hook

Endpoint : http://test.com:8080/job/dusted//build?token=TEST_TOKEN

Module name - empty

Project name - test_1

Token – empty

I’m committing the code built the build is not getting triggered.

Can someone explain what my mistake is?

Aug 7, 2018 in Jenkins by lina
• 8,220 points

recategorized Nov 12, 2018 by Omkar 1,924 views

1 answer to this question.

0 votes

You have the wrong endpoint - it should be the url of your jenkins instance, not the job url.

Try this..

you don't only trigger your build but also be able to build different branches by different Jenkins projects

  • install Bitbucket Plugin at your Jenkins
  • Add a normal Post as Hook to your Bitbucket repository (Settings -> Hooks) and use following url:

https://YOUR.JENKINS.SERVER:PORT/bitbucket-hook

  • Configure your Jenkins project as follows:
    • under build trigger enable Build when a change is pushed to BitBucket
    • under Source Code Management select GIT; enter your credentials and define Branches to build (like **feature/*)
answered Aug 7, 2018 by Nilesh
• 7,060 points

Related Questions In Jenkins

0 votes
1 answer

gulp serve & not working in jenkins

Try using nohup. It will creates nohup.out ...READ MORE

answered May 11, 2018 in Jenkins by DareDev
• 6,890 points
1,316 views
0 votes
2 answers

Subversion (SVNKIT) not working in Jenkins

Jenkins doesn't use the installed Subversion command ...READ MORE

answered Aug 8, 2018 in Jenkins by Kalgi
• 52,350 points
2,412 views
+2 votes
1 answer

Want to Invoke Other Jenkins Job from Declerative pipleline || Not working

Hi@atul, As it is showing in your error ...READ MORE

answered Apr 8, 2020 in Jenkins by MD
• 95,460 points
6,434 views
0 votes
5 answers
+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,036 views
+2 votes
1 answer
0 votes
1 answer

Jenkins: invalid version of SVN working copy

Try this manage jenkins > configure system look ...READ MORE

answered Aug 7, 2018 in Jenkins by Nilesh
• 7,060 points
3,801 views
0 votes
1 answer

Jenkins console output not in realtime

Make sure your script is flushing it ...READ MORE

answered Aug 7, 2018 in Jenkins by Nilesh
• 7,060 points
5,657 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