diff --git a/.circleci/config.yml b/.circleci/config.yml index 150cfd3..4cd0de3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -103,7 +103,15 @@ jobs: - run: name: Heroku Deploy command: git push https://heroku:$HEROKU_API_KEY@git.heroku.com/$HEROKU_APP_NAME.git origin/main - + - run: + name: Smoke test + command: | + HTTPCODE=`curl -s -o /dev/null -w "%{http_code}" https://devops-project-back.herokuapp.com/api/articles` + if [[ "$HTTPCODE" -ne 200 ]]; then + echo "heroku app not responding, failing deploy" \ + exit 1; \ + fi + docker-build-and-push: working_directory: /dockerapp docker: