stash-jenkins-postreceive-webhook icon indicating copy to clipboard operation
stash-jenkins-postreceive-webhook copied to clipboard

Webhook not working when Repo Clone URL set to HTTP

Open henryechen opened this issue 9 years ago • 7 comments

I just found an issue where the webhook does not work when 'Repo Clone URL' is left as HTTP. I had to change the URL type to Custom and put in the same URL that was listed under HTTP to get builds on commit working.

henryechen avatar Oct 05 '15 21:10 henryechen

Tried that, but it always switches back to HTTP after saving the config. How did you do it?

omicloud avatar Nov 20 '15 10:11 omicloud

It always changes back for me too but still works.

On Nov 20, 2015, at 5:24 AM, omicloud [email protected] wrote:

Tried that, but it always switches back to HTTP after saving the config. How did you do it?

— Reply to this email directly or view it on GitHub.

henryechen avatar Nov 20 '15 13:11 henryechen

I can confirm the following behaviour:

  • set to HTTP/SSH the post commit hook does not trigger a build
  • set to custom with the same URL as HTTP/SSH the post commit hook works
  • After saving a custom URL and reopening the settings menu, custom is no longer selected. In case changes need to be saved custom must be reselected to not brake the hook.

psykx avatar Dec 15 '15 15:12 psykx

Any update on this one? I am see the same problem, except setting the custom field doesn't fix the problem for me!

Pressing the trigger build button in a pull request or inside of the post-commit webhook settings for the plugin does successfully trigger a build.

A build doesn't fire off when checking code into a repo however.

njtman avatar Apr 28 '16 22:04 njtman

I have the exact opposite problem - HTTP works fine as the webhook URL ,but SSH doesnt.

Jenkins returns a "No git jobs using repository: ssh:// and the pipeline job has SCM enabled etc.

herebebogans avatar Jun 01 '16 13:06 herebebogans

OK Not sure if we had the exact same issue but we managed to solve it by doing a manual build in Jenkins after changing the clone URL. This somehow updates the webhook to match up the SCM poll URL.

herebebogans avatar Jun 02 '16 12:06 herebebogans

The jenkins job config xml isn't actually updated until you trigger your next job. I think your job was just out of synch...

thrownullpointer avatar Jun 23 '17 01:06 thrownullpointer