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,100 points

recategorized Nov 12, 2018 by Omkar 20 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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
• 6,900 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,520 points
83 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
• 35,720 points
91 views
0 votes
5 answers
+2 votes
1 answer

Subversion (SVNKit) working with Jenkins

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

answered Aug 8, 2018 in Jenkins by Kalgi
• 35,720 points
319 views
+13 votes
2 answers
0 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
• 6,900 points
113 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
• 6,900 points
679 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.