Skip to content

Commit

Permalink
Tweaked webhook server initialization params
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardogsilva committed Apr 8, 2024
1 parent 6ff8bdc commit b22e7ac
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
16 changes: 8 additions & 8 deletions deployments/staging/hooks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@
pass-arguments-to-command:
# location of the hook scripts
- source: string
name: /home/arpav/staging/hook-scripts/deploy.py
name: /home/arpav/webhooks/hook-scripts/deploy.py
# deployment root dir
- source: string
name: /home/arpav
- source: entire-payload
# ensure the deployment script does not run in dry-mode
- source: string
name: '--confirm'
command-working-directory: /home/arpav/staging/hook-scripts
command-working-directory: /home/arpav/webhooks/hook-scripts
trigger-rule:
- match:
type: payload-hmac-sha256
secret: '{{ getenv "WEBHOOK_SECRET" | js }}'
parameter:
source: header
value: X-Hub-Signature-256
match:
type: payload-hmac-sha256
secret: '{{ getenv "WEBHOOK_SECRET" | js }}'
parameter:
source: header
value: X-Hub-Signature-256
7 changes: 5 additions & 2 deletions deployments/staging/webhook.service
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# systemd service file for the webhook server
# place this in /etc/systemd/system
# - Create the `/etc/systemd/system/webhook.service` file with these contents
# - Then modify the value of the WEBHOOK_SECRET environment variable
# - Run `sudo systemctl daemon-relaod`
# - Finally run sudo systemctl start webhook.conf

[Service]
EnvironmentFile=/home/arpav/arpav-ppcv.env
Environment="WEBHOOK_SECRET=change-me"
ExecStart=/usr/bin/webhook -template -port 9001 -hooks /home/arpav/webhooks/hooks.yaml
User=arpav
Group=arpav

0 comments on commit b22e7ac

Please sign in to comment.