Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bitbucket Server Webhook to Jenkins: Error: Jenkins response: No git jobs using repository

I've installed Webhook to Jenkins for Bitbucket plugin in bitbucket server. The main goal is that a jenkins build will be triggered after a commit.

After the install I've enabled the plugin: jenkins-url: https://url/jenkins ssh: ssh@git.. (same command is used in SCM plugin jenkins job).

The jenkins job works (git clone etc works) but the plugin isn't working. When I click test on the jenkins webhook plugin it shows me:

Error: Jenkins response: No git jobs using repository: ssh://[email protected] t and branches: master 

The URL is right. So it is used in my jenkins job (and branch master). I've even copied the url from the error as URL in the jenkins job and it is still able to clone the repo. What do I forget?

EDIT:

I found some info that you should enable SCM polling in your job (even if this is polling once in a year). Only than this plugin will work? Is this the normal behaviour? (it seems to fix my issue)

like image 431
DenCowboy Avatar asked Sep 07 '17 09:09

DenCowboy


3 Answers

Configure your project. Under Triggers, make sure that Poll SCM is checked.

You can enter a schedule if you want, but you don't have to. If no schedule is entered, it should display something like "No schedules so will only run due to SCM changes if triggered by a post-commit hook".

like image 51
farrellw Avatar answered Nov 02 '22 03:11

farrellw


Yes, you have to check Poll_SCM in the Build Triggers section of your Jenkins Job configuration - I can confirm this. I'm doing the same thing you are and that's how I got it to work - you can find confirmation of such at the Atlassian site

like image 31
randomNerdboy Avatar answered Nov 02 '22 04:11

randomNerdboy


For me the problem was that BitBucket was using all lower case git url but jenkins was internally using the url with parts in the original case and therefore it found not machting project. Adding an custom url fixed the issue for me

like image 3
Fritz Avatar answered Nov 02 '22 02:11

Fritz