Skip to content

Instantly share code, notes, and snippets.

@emil-nasso
Created November 24, 2017 13:44
Show Gist options
  • Save emil-nasso/c9719b6bd83a86b2fdebd033d09024db to your computer and use it in GitHub Desktop.
Save emil-nasso/c9719b6bd83a86b2fdebd033d09024db to your computer and use it in GitHub Desktop.
- id: date
execute-command: date
include-command-output-in-response: true
- id: echo
execute-command: echo
include-command-output-in-response: true
pass-arguments-to-command:
- source: payload
name: text
- id: redeploy
working-directory: "~"
include-command-output-in-response: true
execute-command: "/root/webhooks/redeploy.sh"
pass-environment-to-command:
- source: url
name: service
envname: SERVICE
trigger-rule:
and:
- match:
type: value
value: mypassword
parameter:
source: header
name: X-auth
- match:
type: ip-whitelist
ip-range: 79.99.4.16/32
#!/bin/bash
if [[ ! -z "${SERVICE}" ]]; then
docker-compose pull $SERVICE && docker-compose up -d $SERVICE
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment