0
votes

I have installed jenkins on my azure vm. I have installed the jenkins plugin "Generic Webhook Trigger" I have created a freestyle build item : in the section "Build Triggers" I have check "Generic Webhook Trigger" in the section "Source Code Management", set my repository url to the repository to watch

When I open a browser and type the following url in the adress bar : http://JENKINSURL/generic-webhook-trigger/invoke A build is triggered on jenkins

But what I would like to do, is trigger a build not by typing this url in a browser adress bar but by pushing some code modifications on a repository, to do that I have add a webhook in the settings of my bitbucket repository :

the url is the same as before : http://JENKINSURL/generic-webhook-trigger/invoke the status is active the checkbox skip certificate verification is checked the triggers selected is "Repository push"

With all of that, when I do a push on the repository, a request is made to my jenkins server but not build is trigger and when I go to the request detail on bitbucket, I see that I get a 404 http status as response.

I don't understand what to add to trigger the jenkins build from a bitbucket code push

1

1 Answers

2
votes

I think you have to add a token in the generic webhook trigger settings. This token is added to you url in Bitbucket also.