From 20d1c43dc37f4c9cfaf42a8a27f4692bd5a919bf Mon Sep 17 00:00:00 2001 From: lamya-rey Date: Mon, 18 Jan 2021 15:20:32 +0100 Subject: [PATCH] :construction_worker: add cmd run --- .circleci/config.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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: