Add buildkite scripts

This commit is contained in:
Rohan Mitchell
2015-04-15 13:36:40 +10:00
parent 2072744870
commit 4672cc4863
3 changed files with 32 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
#!/bin/bash
set -e
PROD_TEST=`git remote | grep -s 'production' || true`
if [[ "$PROD_TEST" != *production* ]]; then
git remote add production ubuntu@ofn-prod:apps/openfoodweb/current
fi
[[ $(git push production $BUILDKITE_COMMIT:master --force 2>&1) =~ "Done" ]]

10
script/push_to_staging.sh Normal file
View File

@@ -0,0 +1,10 @@
#!/bin/bash
set -e
ST2_TEST=`git remote | grep -s 'staging2' || true`
if [[ "$ST2_TEST" != *staging2* ]]; then
git remote add staging2 openfoodweb@ofn-staging2:apps/openfoodweb/current
fi
[[ $(git push staging2 $BUILDKITE_COMMIT:master --force 2>&1) =~ "Done" ]]

12
script/run_tests.sh Executable file
View File

@@ -0,0 +1,12 @@
#!/bin/bash
set -e
echo "--- Bundling"
bundle install
echo "--- Preparing test database"
bundle exec rake db:test:prepare
echo "--- Running tests"
bundle exec rake