From 2d16e4e845b31f7802779ff28c6a7ea85c269bac Mon Sep 17 00:00:00 2001 From: spokequenouille Date: Tue, 12 Jan 2021 16:28:01 +0100 Subject: [PATCH] :construction: test --- .circleci/config.yml | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c75e11b..6c623db 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -43,11 +43,33 @@ jobs: . venv/bin/activate flask db upgrade flask test + deploy-heroku: + docker: + - image : buildpack-deps:trusty + steps: + - checkout + - run: + name: Deploy main to heroku + command: | + git config --global push.default matching + git push https://heroku:$HEROKU_API_KEY@git.heroku.com/$HEROKU_APP_NAME.git main + - 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 workflows: build_test_deploy: jobs: - build - - test: - requires: + #- test: + # requires: + # - build + - deploy-heroku: + context: Heroku + requires: - build \ No newline at end of file