chore: Update scripts.

This commit is contained in:
Nicolas Carlier 2014-09-23 18:23:28 +00:00
parent 9f1f9d0f78
commit 4eee79bcf2
4 changed files with 34 additions and 11 deletions

16
bin/bash Executable file
View File

@ -0,0 +1,16 @@
#!/bin/sh
###
# Simple script to get a shell into the container.
###
sudo docker run \
--name webhookd \
--rm \
--env-file="./etc/env.conf" \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /home/nicolas/.ssh/deploy_rsa:/root/.ssh/id_rsa \
-it \
--entrypoint="/bin/bash" \
ncarlier/webhookd \
-c /bin/bash

11
bin/start Executable file
View File

@ -0,0 +1,11 @@
#!/bin/sh
#-v ~/.ssh/deploy_rsa:/var/opt/webhookd/deploy_rsa \
sudo docker run \
--name webhookd \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /home/nicolas/.ssh/deploy_rsa:/root/.ssh/id_rsa \
-it --rm \
-P \
--env-file ./etc/env.conf \
ncarlier/webhookd

View File

@ -1,21 +1,24 @@
#!/bin/sh
IP=`sudo docker inspect --format '{{ .NetworkSettings.IPAddress }}' webhookd`
echo "Test bad URL"
curl -H "Content-Type: application/json" \
--data @assets/bitbucket.json \
http://localhost:8080/bad/action
http://$IP:8080/bad/action
echo "Test Bitbucket hook"
curl -H "Content-Type: application/json" \
--data @assets/bitbucket.json \
http://localhost:8080/bitbucket/echo
http://$IP:8080/bitbucket/echo
echo "Test Github hook"
curl -H "Content-Type: application/json" \
--data @assets/github.json \
http://localhost:8080/github/echo
http://$IP:8080/github/echo
echo "Test Docker hook"
curl -H "Content-Type: application/json" \
--data @assets/docker.json \
http://localhost:8080/docker/echo
http://$IP:8080/docker/echo

7
start
View File

@ -1,7 +0,0 @@
#!/bin/sh
export APP_NOTIFIER="http"
export APP_HTTP_NOTIFIER_URL="http://requestb.in/v9b229v9"
go run src/main.go