Created
November 24, 2017 13:44
-
-
Save emil-nasso/c9719b6bd83a86b2fdebd033d09024db to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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