I had the same problem. @fmitchell is correct with its suggestions for these fields. But that did not work for me.
Instead, I use a regular POST Hook, where I provide the entire URL:
http://USER_NAME: USER_TOKEN@YOUR.JENKINS.URL.COM :YOUR_PORT/job/YOUR_PROJECT_NAME/build?token=some_token_from_jenkins eg: http:// bob.miller@jenkins.example.com :8080/job/test_1/build?token=TEST_TOKEN
It seems that Bitbuckt is missing the last "build" parameter in its generated URL, but I canβt say for sure.
------ Update ------
I found the best solution in which you not only run your build, but also can create different branches for various Jenkins projects:
- Install the Bitbucket Plugin on Your Jenkins
- Add a regular mailbox to your Bitbucket repository (Settings β Hooks) and use the following URL:
https: //YOUR.JENKINS.SERVER: PORT / Bitbucket hook
- Set up your Jenkins project as follows:
- in build trigger enable Build when the change is transferred to BitBucket
- in Source Control, select GIT ; enter your credentials and define the Branches to create (e.g. ** feature / *)
Thus, I have three build projects, one for all functions, one for development, and one for the release branch.
And best of all, you don't need to add new hooks for new Jenkins projects.
source share