diff --git a/.circleci/config.yml b/.circleci/config.yml index a03ce37..9526776 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -63,11 +63,7 @@ jobs: - run: name: Smoke test command: | - HTTPCODE=`curl -s -o /dev/null -w "%{http_code}" https://$HEROKU_APP_NAME.herokuapp.com/api/articles` - if [ "$HTTPCODE" -ne 200 ];then - echo "heroku app not responding, failing deploy" - exit 1 - fi + ./testbackend.sh buildandpush_dockerhub: docker: - image: docker:17.05.0-ce-git diff --git a/testbackend.sh b/testbackend.sh index a895b07..66e49df 100755 --- a/testbackend.sh +++ b/testbackend.sh @@ -1,5 +1,5 @@ -#HTTPCODE=$(echo `curl -s -o /dev/null -w "%{http_code}" https://$HEROKU_APP_NAME.herokuapp.com/api/articles` | tr -d ' ') -#if [ "$HTTPCODE" -ne 200 ];then -# echo "heroku app not responding, failing deploy" -# exit 1 -#fi \ No newline at end of file +HTTPCODE=`curl -s -o /dev/null -w "%{http_code}" https://$HEROKU_APP_NAME.herokuapp.com/api/articles` +if [ "$HTTPCODE" -ne 200 ];then + echo "heroku app not responding, failing deploy" + exit 1 +fi \ No newline at end of file