Commit Graph

4 Commits

Author SHA1 Message Date
Will Rouesnel
08fc28b38f Add streaming command support.
Add options
- `stream-stdout-in-response`
- `stream-stdout-in-response-on-error`
- `stream-command-kill-grace-period-seconds`

to allow defining webhooks which dynamically stream large content back to the
requestor. This allows the creation of download endpoints from scripts, i.e.
running a `git archive` command or a database dump from a docker container,
without needing to buffer up the original.
2019-03-01 15:41:20 +11:00
Cameron Moore
8d260c6a7e Apply gofmt 2018-02-16 20:26:33 -06:00
Greg Dubicki
0d3d29055b Allow hookecho to exit with codes other than 0 2017-11-11 21:05:36 +01:00
Cameron Moore
ea3dbf3438 Add environment arguments and improve testing
There's a lot in this commit.

 1. Add `pass-environment-to-command` option that works much like
 `pass-arguments-to-command`.  You can see an example usage in the
 "github" test case.

 2. Add a test program called "hookecho" that is used to test the
 webhook package instead of relying upon a system `echo` command.

 3. Move hooks_test.json to a template so that we can update the path to
 hookecho on the fly.

 4. Don't return an error at the end of hook.MatchRule.Evaluate().  All
 tests succeed for me now.
2015-11-02 15:11:23 -06:00