diff --git a/.circleci/config.yml b/.circleci/config.yml index 1f93aaa..237e0c6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,7 +2,7 @@ version: 2 jobs: build: docker: - - image: circleci/python:latest + - image: circleci/python:3.8 working_directory: ~/repo steps: - checkout @@ -25,7 +25,7 @@ jobs: test: docker: - - image: circleci/python:latest + - image: circleci/python:3.8 - image: circleci/postgres:9.6.2-alpine environment: POSTGRES_USER: myUser @@ -75,15 +75,14 @@ jobs: - run: name: Heroku deploy command: | - git config --global push.default matching - git push https://heroku:$HEROKU_API_KEY@git.heroku.com/$HEROKU_APP_NAME.git main + git push https://heroku:$HEROKU_API_KEY@git.heroku.com/$HEROKU_APP_NAME.git HEAD: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 \ - HTTPCODE=`curl -s -o /dev/null -w "%{http_code}" https://$HEROKU_APP_NAME.herokuapp.com/` + exit 1; \ fi docker-build-and-push: