Files
openfoodnetwork/script/ci/push_to_production.sh
Rohan Mitchell bd6bac8874 Display deployment output in real time
This reverts commit 485eee4bdd.
2015-05-06 20:02:22 +10:00

16 lines
505 B
Bash
Executable File

#!/bin/bash
set -ex
# Add production git remote if required
PROD_TEST=`git remote | grep -s 'production' || true`
if [[ "$PROD_TEST" != *production* ]]; then
git remote add production ubuntu@ofn-prod:apps/openfoodweb/current
fi
echo "--- Saving baseline data for staging"
ssh ofn-staging2 "/home/openfoodweb/apps/openfoodweb/current/script/ci/save_staging_baseline.sh $BUILDKITE_COMMIT"
echo "--- Pushing to production"
[[ $(git push production $BUILDKITE_COMMIT:master --force 2>&1) =~ "Done" ]]