mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-25 20:46:48 +00:00
Add buildkite scripts
This commit is contained in:
10
script/push_to_production.sh
Normal file
10
script/push_to_production.sh
Normal 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
10
script/push_to_staging.sh
Normal 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
12
script/run_tests.sh
Executable 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
|
||||
Reference in New Issue
Block a user