Replace gitreceive by a git plugin.

This removes the need for two distinct users.
Git pushes and dokku commands are sent using the same user.
This commit is contained in:
Paul Lietar
2013-10-27 22:35:19 +00:00
parent 6350f373be
commit 27d4bc8c3c
11 changed files with 64 additions and 39 deletions

View File

@@ -36,7 +36,6 @@ set -e
echo "-----> Connecting and running bootstrap script..."
cat ../bootstrap.sh | ssh -o "StrictHostKeyChecking=no" ubuntu@$PUBLIC_IP "HOSTNAME=$PUBLIC_IP sudo bash" 2>&1 | indent
echo "-----> Installing SSH public keys..."
cat ~/.ssh/id_rsa.pub | ssh -o "StrictHostKeyChecking=no" ubuntu@$PUBLIC_IP "sudo gitreceive upload-key test" > /dev/null
cat ~/.ssh/id_rsa.pub | ssh -o "StrictHostKeyChecking=no" ubuntu@$PUBLIC_IP "sudo sshcommand acl-add dokku test" > /dev/null
for app_path in apps/*; do
app=$(basename $app_path)

View File

@@ -15,7 +15,6 @@ cd "$(dirname $SELF)/.." && vagrant up | indent
cd "$(dirname $SELF)"
echo "-----> Installing SSH public keys..."
cat $PUBLIC_KEY | ssh -o "StrictHostKeyChecking=no" -i ~/.vagrant.d/insecure_private_key vagrant@dokku.me "sudo gitreceive upload-key test"
cat $PUBLIC_KEY | ssh -o "StrictHostKeyChecking=no" -i ~/.vagrant.d/insecure_private_key vagrant@dokku.me "sudo sshcommand acl-add dokku test"
for app_path in apps/*; do

View File

@@ -11,11 +11,11 @@ git config user.name "Test Robot"
git add .
git commit -m 'initial commit'
REPO="test-$(basename $APP)-$RANDOM"
git remote add target git@$TARGET:$REPO
git remote add target dokku@$TARGET:$REPO
git push target master
URL=$(ssh dokku@$TARGET url $REPO)$FORWARDED_PORT
sleep 2
./check_deploy $URL && echo "-----> Deploy success!" || {
sleep 4
./check_deploy $URL && echo "-----> Deploy success!"
}
}