#webhooks example

1 messages · Page 1 of 1 (latest)

fathom marlin
#

Thanks - is hooks.json a pre-existing file format, or something you defined in your project?

strong raft
heavy agate
#

☝️ . It's not very pretty, but it's good for a v0 that shows how to quickly wrap cool projects with dagger adding functionality

fathom marlin
#

Ah I see! cool

#

Then post-POC we can add a domain-specific tool and configuration format

strong raft
#

Yes, I was telling Mati today that this file can be definitely improved with something nicer

heavy agate
#

@fathom marlin super rough v0: https://github.com/franela/webhook. We found a problem with dagger where if services are not properly stopped before the module is stopped then the next time you run a dagger command it will hang in starting session. This will happen if you run the project in webhook server mode. Rough TL;DR:
There are two "modes":

  • Plain reverse proxy: provide a hooks.json file on startup. Useful for when you want to run dagger commands that are not specific to a repo or a given context (e.g a slack webhook)
  • Git wrapper proxy: in this mode you can point your repository to this webhooks instance and it will clone the repository for you and run the hooks defined in the repo. Kind of like what the checkout action does. This is what we called the "Portable CI runner" mode
#

The README is a bit rough. We want to write a fun demo for the next community call and with that we'll clean things up and add better examples!