mohamicorp / stash-jenkins-postreceive-webhook

Webhook used to notify Jenkins when commits are made to Stash
Other
138 stars 98 forks source link

Plugin admin settings breaks on Stash 3.2.0 #75

Closed tayzlor closed 9 years ago

tayzlor commented 10 years ago

When trying to configure the plugin - I'm receiving this error (when trying to configure the settings for the hook (in settings in the repo) -

Failed to load config form: com.nerdwin15.stash-stash-webhook-jenkins:jenkinsPostReceiveHook-config-form, errors: TypeError: Cannot read property 'nerdwin15' of undefined

It also seems that since upgrading from 3.1.x to 3.2.0 - the plugin is no longer triggering our Jenkins server

We are using the latest version of the plugin 2.5.0

tayzlor commented 10 years ago

Some more infromation - form the google web console throws this error in the JS -

Uncaught TypeError: Cannot read property 'getFromRef' of undefined

mikesir87 commented 10 years ago

Thanks for the bug report. I just did the update myself to 3.2.0 and I'm not seeing any error messages (don't you love spurious bugs?).

Does this throw on all browsers? I haven't touched any of the JS code in a release or two. What version of the plugin did you just upgrade from when going to 2.5.0?

tayzlor commented 10 years ago

Hey thanks for the swift reply! we went from 2.4.2 to 2.5.0 during the upgrade (of Stash - from 3.1.0 > 3.2.0). Rolling back to plugin version 2.4.2 (on Stash 3.2.0) works however... if you can't find anything we could do some digging and try re-applying the upgrade for the plugin again.

mikesir87 commented 10 years ago

Was there any log output in your Stash logs? Any exceptions or anything else notable?

MoreSolutions commented 10 years ago

I'm also seeing the same issue. Nothing relevant seems to show up in the logs.

mikesir87 commented 10 years ago

Ok. @MoreSolutions this occurs to you as well on the admin page for the webhook settings for a repo?

mikesir87 commented 10 years ago

Alright... looks like I've figured it out! It looks like the Javascript used for the "Trigger a Build" button that appears on the pull request page is also being loaded on the config screen (not sure on why that is), which relies on some state that isn't present at that point. I've moved the code around a little bit to only use the needed state when it's actually invoked, which resolves the issue.

If you can try to install a new snapshot build at the link below and let me know if it resolves your issues?

http://nerdwin15.com/public/stash-webhook-jenkins-2.5.1-SNAPSHOT.jar MD5: 283fab906d844c988d6054782211b71f

MoreSolutions commented 10 years ago

The snapshot build fixed the error on the configuration page, but now the "Trigger Jenkins" button results in this error: "Error: Jenkins response: No git consumers for URI ssh://git@". I confirmed that the same git url is used in Jenkins. Do you know what the cause could be?

mikesir87 commented 10 years ago

Sorry for slow response... your comment slipped by unnoticed.

That error means that there is no Jenkins build that is configured to use that clone URL. You have to use the same protocol on each end for it to work. (If you're cloning using SSH, use the SSH setting)

rainhover commented 10 years ago

Hi @mikesir87

we met similiar issue from 2.4.0 to 2.5.0, and our stash is 2.12.2. downgrade to 2.4.2, the issue solved. Thanks for your working for this great plugin, and it helps us a lot.

@MoreSolutions I also met such problem during debug in yesterday, but jenkins still works and can build normally with this warning

I tried to use the command in the wiki: $ curl -v http://10.69.2.220:8080/git/notifyCommit?url=ssh://git@stash..com:7999/ate/test.git

cheekymonkat commented 10 years ago

Hi, We upgraded to 2.5 last night (using Stash 3.2.0) - and I see the error : Error: Jenkins response: No git consumers for URI ...

Jenkins is set to use SSH and the plugin is set to SSH. This all worked in the previous version.

It doesn't however break the plugin from working as a push triggers the build with polling disabled. (nice) :)

Thanks Alan

MoreSolutions commented 9 years ago

Sorry I forgot to reply earlier... the 2.5.1 snapshot build works fine. It will be great if this version could be posted to the marketplace.

faiyat commented 9 years ago

Where can we download this version? What has been fixed in this release?

MoreSolutions commented 9 years ago

See the comment from @mikesir87 up a bit.

mikesir87 commented 9 years ago

Version 2.5.1 was just released, which resolves this issue.