Commit Graph

450 Commits

Author SHA1 Message Date
Cameron Moore 48061f1508 Simplify boolean some comparisons 2018-02-16 20:23:25 -06:00
Cameron Moore cfed5cfe4b Fix unnecessary use of printf 2018-02-16 20:18:40 -06:00
Cameron Moore 471c849c50 Fix another race condition in TestWebhook
There's the potential for a race condition where we try to read the logs
buffer before the logs have been flushed by the webhook process. Kill
the process to flush the logs before testing against the log buffer.
2018-02-16 14:36:08 -06:00
Cameron Moore 337621998e Fix race in TestWebhook
Previous commit misused a bytes.Buffer. Protect the buffer with a
mutex.
2018-02-15 19:53:28 -06:00
Cameron Moore 0feeb945fc Fix some tests for Windows
This commit incorporates some tests into the main TestWebhook framework.  New features to TestWebhook:

- Check log output against Regexp
- Add Testing sub-tests

Updates #225
2018-02-15 19:20:39 -06:00
Adnan Hajdarević 4f9ed434c5 Merge pull request #227 from moorereason/iss226
Add Travis CI and Appveyor configurations
2018-02-15 20:24:46 +01:00
Cameron Moore 0934b9414c Add Travis CI and Appveyor configurations
Fixes #226
2018-02-14 16:35:54 -06:00
Adnan Hajdarević 356870358d Merge pull request #218 from hassanbabaie/development
Document updates for new scalr-signature feature
2018-02-14 15:39:42 +01:00
Hass_SEA 6dc331726d Updated Examples document with scalr-signature
Updated the Examples document with an example of how you would use the scalr-signature match rule
2018-01-18 12:43:12 -08:00
Hass_SEA 3f8dbf09dc Correct typos - Rules Document with scalr-signature
Correct typos - Rules Document with scalr-signature
2018-01-18 12:40:05 -08:00
Hass_SEA dcda096b5d Update Rules Document with scalr-signature
Updated Rules Document with scalr-signature information
2018-01-18 12:36:16 -08:00
Hass_SEA 7079128eca Merge pull request #1 from adnanh/development
Merge latest Adnanh/webhook Development into fork
2018-01-18 11:42:28 -08:00
Adnan Hajdarević 6e3ec89ce1 Merge pull request #210 from hassanbabaie/master
Add support for Scalr webhook signature verification (new Match Rule) #200 - Updated
2018-01-16 09:26:26 +01:00
Adnan Hajdarević 10396a5434 Update README.md 2018-01-11 10:34:55 +01:00
Adnan Hajdarević d009919755 Update README.md 2018-01-11 10:34:07 +01:00
Adnan Hajdarevic a811db410b check before removing 2.6.8 2017-12-21 13:25:19 +01:00
Adnan Hajdarević 357c471667 Merge pull request #212 from adnanh/fix-file-panic
Fix nilpointer dereference when file cannot be created
2017-12-21 13:15:18 +01:00
Adnan Hajdarevic 85889fe378 Fix nilpointer dereference when file cannot be created 2017-12-21 13:14:07 +01:00
Hass_SEA b595694658 Update to support Scalr Signature Verification
Add a new match rule type that checks for a Scalr webhook signature. Tracking ticket #200

The signature algorithm is described here:
https://scalr-wiki.atlassian.net/wiki/spaces/docs/pages/6193247/Webhook+Security+and+Authentication

An example match rule ifor a Scalr webhook will look like:

"match": {
"type": "scalr-signature",
"secret": ""
}
2017-12-19 12:48:10 -08:00
Adnan Hajdarevic ecbba514e5 Bump version 2.6.7 2017-12-13 20:46:15 +01:00
Adnan Hajdarevic 13555e1ef1 Merge 2017-12-13 20:45:22 +01:00
Adnan Hajdarević ddec431ae9 Update README.md 2017-11-29 11:17:48 +01:00
Donald Clark Jackson f84edae99d added support for incoming-payload-content-type 2017-11-27 14:02:57 -08:00
Adnan Hajdarević 514388e39e Merge pull request #166 from gdubicki/add_CaptureCommandOutputOnError
Add option to capture output of failed commands
2017-11-13 19:24:53 +01:00
Adnan Hajdarević a49364ae93 Update README.md 2017-11-13 08:44:31 +01:00
Adnan Hajdarević 6c4e52d87e Update README.md 2017-11-13 08:39:33 +01:00
Adnan Hajdarević b161de13f2 Add DigitalOcean to sponsors 2017-11-13 08:38:55 +01:00
Greg Dubicki e2f6e4eb37 Add tests for capturing command output
and fix running tests on macOS, where there is no
/bin/true...
2017-11-11 21:40:34 +01:00
Greg Dubicki 0d3d29055b Allow hookecho to exit with codes other than 0 2017-11-11 21:05:36 +01:00
Greg Dubicki a40fba5e29 Add CaptureCommandOutputOnError
to include stdout & stderror in failed executions,
with docs.
2017-11-11 18:46:55 +01:00
Adnan Hajdarević 137ded093d Update README.md 2017-11-11 12:39:18 +01:00
Adnan Hajdarevic 24ec77cb6a crisp 2017-11-11 12:29:39 +01:00
Adnan Hajdarevic 7f3529e302 Add project logo 2017-11-11 12:18:20 +01:00
Adnan Hajdarević df781925f1 Merge pull request #195 from moorereason/iss193
Add Template docs
2017-11-11 01:33:48 +01:00
Cameron Moore 44d19e34a0 Add Template docs
In addition to the Template docs, README is updated to use the "w" URL
shortcut.

Fixes #193
2017-11-10 16:11:29 -06:00
Adnan Hajdarević b1e0c0bf01 Merge pull request #194 from moorereason/iss192
Add docs
2017-11-10 21:05:50 +01:00
Cameron Moore bab32db017 Add docs 2017-11-10 12:54:15 -06:00
Cameron Moore 5a69eab2b3 Convert README.md to unix line endings 2017-11-10 12:48:19 -06:00
Adnan Hajdarević 01aa178bb4 Merge pull request #161 from moorereason/templates
Allow hooks file to be parsed as a template
2017-11-09 12:00:14 +01:00
Cameron Moore f5f04ddaa2 Allow hooks file to be parsed as a template
Add a -template command line option that instructs webhook to parse the
hooks files as Go text templates.

Includes a `getenv` template func for retrieving environment variables.
2017-11-08 09:14:58 -06:00
Adnan Hajdarević ba0adb117a Merge pull request #174 from col-panic/master
Pass "big" binary files #162
2017-11-08 10:56:49 +01:00
Marco Descher c107bb4539 Merge branch 'master' of https://github.com/adnanh/webhook into colpanic/master 2017-11-08 08:33:22 +01:00
Adnan Hajdarevic 36c5a52539 Merge branch 'master' of github.com:adnanh/webhook 2017-11-07 19:22:41 +01:00
Adnan Hajdarevic 027f2d7363 Fix tests 2017-11-07 19:22:32 +01:00
Marco Descher c9abc252e8 Delete hook files by default 2017-11-07 16:38:12 +01:00
Marco Descher 6145634670 Adapt to #173 2017-11-07 16:19:22 +01:00
Marco Descher 41b75acc70 Merge branch 'master' into master 2017-11-07 16:14:47 +01:00
Adnan Hajdarević 83e688efd3 Update README.md 2017-11-05 16:54:05 +01:00
Adnan Hajdarević b1851784b5 Merge pull request #188 from adnanh/development
Merge pull request #187 from adnanh/master
2017-11-05 16:50:31 +01:00
Adnan Hajdarević 3c0508a8d3 Merge pull request #187 from adnanh/master
Backmerge
2017-11-05 16:50:09 +01:00