From b11bb7ad19e4dc301f17f5eb93eb19708d4a373e Mon Sep 17 00:00:00 2001 From: Gianni Giudice <45078018+GianniGiudice@users.noreply.github.com> Date: Tue, 1 Dec 2020 15:52:45 +0100 Subject: [PATCH] config --- .circleci/config.yml | 4 ++-- test.sh | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 test.sh diff --git a/.circleci/config.yml b/.circleci/config.yml index dd8f9d1..b8231ae 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -121,10 +121,10 @@ jobs: - checkout - run: name: Heroku Deploy - command: echo todo && false + command: git push heroku main - run: name: Smoke Test - command: echo todo && false + command: ./test.sh workflows: version: 2 diff --git a/test.sh b/test.sh new file mode 100644 index 0000000..afc166b --- /dev/null +++ b/test.sh @@ -0,0 +1,6 @@ +HEROKU_APP_NAME="morning-mountain-84049" +HTTPCODE=`curl -s -o /dev/null -w "%{http_code}" https://$HEROKU_APP_NAME.herokuapp.com/` +if [ "$HTTPCODE" -ne 200 ];then + echo "heroku app not responding, failing deploy" + exit 1 +fi