jfrog / artifactory-user-plugins

Sample Artifactory User Plugins
http://wiki.jfrog.org/confluence/display/RTF/User+Plugins
Apache License 2.0
370 stars 470 forks source link

Endpoint for Determining Active/Available Webhooks #338

Open eapesa opened 4 years ago

eapesa commented 4 years ago

Hi,

I've tried this plugin in our dev instance and is playing around it. I think I have published a number of webhooks already and I would like to know if there's an available method of identifying the list of webhooks that has been published in this plugin. Which also brings me to another issue I am encountering with the plugin. Here's the latest config that I tried to reload:

{
    "webhooks": {
        "testWebhook": {
            "url": "HOST_URL/v1/test",
            "events": [
                "execute.pingWebhook",
                "docker.tagCreated",
                "docker.tagDeleted",
                "storage.afterCreate",
                "storage.afterDelete",
                "storage.afterMove",
                "storage.afterCopy",
                "storage.afterPropertyCreate",
                "storage.afterPropertyDelete"
            ],
            "repositories": [
                "npm"
            ],
            "enabled": true
        }
    },
    "debug": true,
    "timeout": 15000
}

I think I already included all the storage related events but it is still not triggering the HOST_URL I set - when I try to publish a new package to npm nothing happens same when I delete one, I even tried changing and doing the same thing for docker but still same results. I am sure that there are no connectivity issues between the webhook and artifactory as when I run the ping, my webhook gets triggered. I was thinking if this happens because I already set a lot of webhooks but I have no way to track which is active or get the list of all I've created since I set this plugin up.

I hope you could help me on this and let me know if there's any information I need to provide.

Regards, Elixa

arturo-aparicio commented 4 years ago

This sounds relatively easy to implement but the webhook plugin may be deprecated soon. The reason is that we have introduced native webhook functionality into Artifactory itself (https://www.jfrog.com/confluence/display/JFROG/Artifactory+Release+Notes#ArtifactoryReleaseNotes-Artifactory7.6.1). Have you considered using the new, built-in webhook mechanism?

eapesa commented 4 years ago

Cool! We are currently at version 6.13.x and we have plans to upgrade in the near future to 7.x so that feature would definitely help us. May I just know though if version 7.6 would be available if our Artifactory is housed on our own infra? Since it mentioned there that it is only available for Cloud version.

arturo-aparicio commented 4 years ago

Yes, we usually release x.0 versions in our SaaS offerings first and then a minor release after with the same content. The first self-managed version with that would be 7.6.1, which is already out. In fact, I think the latest is 7.9.1 now.

eapesa commented 4 years ago

Cool! Then we'll target 7.6.1 then on our next upgrade and we'll just worked with the webhook on that version. Thank you so much!