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 405 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,020 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
372 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,310 points
948 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,040 points
1,415 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 26, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
967 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,020 points
1,467 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,020 points
2,884 views