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

recategorized Nov 12, 2018 by Omkar 30 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
• 6,880 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,810 points
133 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
• 40,460 points
225 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
• 40,460 points
527 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

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,880 points
343 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,880 points
1,007 views