Last active
August 27, 2015 22:24
-
-
Save austinpray/d067346e447910f9d70a to your computer and use it in GitHub Desktop.
Test trellis
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
.tmp |
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
#!/usr/bin/env bash | |
set -eo pipefail | |
source ./CONFIG | |
(cd $T_DIR; vagrant destroy -f) | |
rm -rf ./.tmp |
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
export TEST_TEMP=.tmp | |
export T_DIR=$TEST_TEMP/trellis | |
export B_DIR=$TEST_TEMP/site | |
export T_COMMIT=8a84639257bdeaceb3b440823e2ac78c5c17906a | |
export B_COMMIT=5dc485e1058e3a32c218e8d90c9abb5929f16cd4 |
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
#!/usr/bin/env bash | |
set -eo pipefail | |
vagrant destroy -f | |
vagrant vagrant up | |
CODE=$(curl -s -I -o /dev/null -w "%{http_code}" http://example.dev/bogus-url-lol) | |
if [ "$CODE" == "404" ] | |
then | |
echo "404" | |
exit 0 | |
else | |
echo $CODE | |
exit 1 | |
fi |
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
#!/usr/bin/env bash | |
set -eo pipefail | |
cp test-bisect-run.sh .tmp/trellis | |
( | |
cd .tmp/trellis | |
git bisect start HEAD 373fe77e90e5208fc96a9def301bb9e17b66f2ac | |
git bisect run ./test-bisect-run.sh | |
git bisect reset | |
) | |
echo "lol" |
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
#!/usr/bin/env bash | |
set -eo pipefail | |
source ./CONFIG | |
[ ! -e $TEST_TEMP ] && mkdir $TEST_TEMP | |
[ ! -e $T_DIR ] && git clone https://github.com/roots/trellis.git $T_DIR | |
(cd $T_DIR; git checkout $T_COMMIT) | |
[ ! -e $B_DIR ] && git clone https://github.com/roots/bedrock.git $B_DIR | |
(cd $B_DIR; git checkout $B_COMMIT) | |
( | |
cd $T_DIR | |
[ ! -e ./vendor ] && ansible-galaxy install -r requirements.yml | |
VM_STATUS=$(vagrant status --machine-readable | grep 'default,state,' | cut -d',' -f4) | |
echo "VM is $VM_STATUS" | |
if [ "$VM_STATUS" != "running" ] | |
then | |
vagrant up | |
fi | |
) | |
curl -vsI http://example.dev/ | |
curl -vsI http://example.dev/sdfsdfrsgv | |
curl -vsI http://example.dev/completelybogus | |
echo "done"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment