first pass at fully functional test infrastructure to work with travis ci

This commit is contained in:
Jeff Lindsay
2013-06-23 02:31:32 -07:00
parent 3a6d2c4442
commit 946973b060
8 changed files with 68 additions and 12 deletions

View File

@@ -1,5 +1,5 @@
#!/bin/bash
# set -e
set -e
SELF=`which $0`; APP="$1"; TARGET="$2"
TMP=$(mktemp -d -t $TARGET)
trap "rm -rf $TMP" EXIT
@@ -11,11 +11,5 @@ git commit -m 'initial commit'
REPO="test-$RANDOM"
git remote add target git@$TARGET:$REPO
URL_FILE=$(mktemp -t url)
git push target master 2>&1 | while read line; do
echo "$line"
[[ $(echo "$line" | grep $TARGET | grep remote) ]] && echo "$line" | awk '{print $2}' > $URL_FILE
done
set -x
URL=$(<$URL_FILE)
curl -v "$URL:8080" # GAHAHHHHH WHY DOESNT THIS WORK
rm $URL_FILE
git push target master
./check_deploy "$(ssh dokku@$TARGET url $REPO)" && echo "-----> Deploy success!"