Replace command parameters with values

To create a minimalistic parser, nom is used to identify and replace
parameters given in the command field.

For clarity the `action` field for hooks was renamed to `command`.
This commit is contained in:
finga 2021-03-21 15:51:58 +01:00
parent 12c3b12c31
commit 0610fd49c9
5 changed files with 205 additions and 23 deletions

View file

@ -1,7 +1,7 @@
---
hooks:
hook1:
action: /usr/bin/local/script_xy.sh
command: /usr/bin/local/script_xy.sh {{ /field2/foo }} asdfasdf
secrets:
- secret_key_01
- secret_key_02
@ -10,7 +10,16 @@ hooks:
pointer: /ref
regex: refs/heads/master
hook2:
action: /usr/bin/local/script_xyz.sh
command: /usr/bin/local/script_xy.sh asdfasdf
secrets:
- secret_key_01
- secret_key_02
filters:
match_ref:
pointer: /ref
regex: refs/heads/master
hook3:
command: /usr/bin/local/script_xyz.sh
secrets:
- secret_key03
filters: