~sbaildon/dev_cluster

ref: bf1b2820761c8df7580edc2de1028927730ad5a3 dev_cluster/reconcile.fish -rwxr-xr-x 387 bytes
bf1b2820 — builds.sr.ht plated/ba9795d 6 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
#!/usr/bin/env fish

set -l url http://webhook-receiver.flux-system.svc.cluster.local(helpers/hook_path.sh)

set -l message "hello"
set -l token (helpers/token.sh | tr -d '\n')
set -l hook_path (helpers/hook_path.sh)
set -l hash (printf $message | openssl dgst -sha256 -hex -hmac $token | awk '{print $1}')

curl -w "%{http_code}" $url -X POST -H "X-Signature: sha256=$hash" -d $message