Giter Site home page Giter Site logo

Some questions... about dockerhub-webhook HOT 6 CLOSED

maccyber avatar maccyber commented on September 24, 2024
Some questions...

from dockerhub-webhook.

Comments (6)

cintiadr avatar cintiadr commented on September 24, 2024 1

Just to keep you (and whoever lands here from google search) in the loop, I'm using a wrapper script to see if there was a newer version of the tag I'm using on docker-compose file:

https://github.com/openmrs/openmrs-contrib-ansible-docker-compose/blob/master/files/dockerhub-webhook/scripts/deploy-compose-if-newer

It's not the smartest thing I've ever coded, but it does work and allow me to deploy it the way it is right now.
In all fairness, the ability to only trigger a webhook on a certain tag is something that could be done in dockerhub itself.

from dockerhub-webhook.

maccyber avatar maccyber commented on September 24, 2024

Thanks, awesome to see it being used.

Earlier I was out on the same quest as you - to find a good dockerhub-webhook service, but i couldn't find any (good). So decided to write my own.

Added some commits, I changed the lookup of repo names, so in scripts/index.js you now have to define the repo with namespace e.g.

module.exports = {
  'cintiadr/testhook': 'hello.sh something', 
}
  1. Got the same error, will look into it.
    Added ability to disable callback to dockerhub see config/index.js
  2. Send me a pull request and I'll merge it
  3. Added ability to run script with parameters

I will look into tag-support.

from dockerhub-webhook.

cintiadr avatar cintiadr commented on September 24, 2024

I did more tests with the callback, and contrary to what the documentation said, it doesn't prevent other webhooks to be triggered. In fact, all webhooks will be triggered at the same time, and they are all showing as success anyway if you look at the webhook history (I suppose that's the 204 we are sending back). I have no idea how or if this callback is supposed to work.
So, while it's a little bit weird, it's not a show stopper.

About the bash: #29
Thanks for the arguments! Even better, I can now even have file redirects:

module.exports = {
  'cintiadr/testhook': 'hello.sh something > /tmp/somefile', 
}

It's brilliant!

from dockerhub-webhook.

cintiadr avatar cintiadr commented on September 24, 2024

Based on https://forums.docker.com/t/webhook-pipelines-dont-wait-for-callback/5813/2 and https://forums.docker.com/t/webhook-callback-failed-400-client-error-when-using-autodeploy/10011/6 , I'd assume that it's broken for way more people. I couldn't create any curl command which allowed an update.
Maybe it's now only available for paid repositories?

Anyway, ignoring the callback works just fine for me.

from dockerhub-webhook.

maccyber avatar maccyber commented on September 24, 2024

Ah, thanks for investigating this. I will disable callbacks by default until this is sorted out @ hub-feedback #943.

Cool with the bash-thingy.

from dockerhub-webhook.

maccyber avatar maccyber commented on September 24, 2024

Rewrote the whole thing and added tag support to this maccyber/micro-dockerhub-hook.

Not well tested..

from dockerhub-webhook.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.