From c73828ebd29dac364249c1bef7cf6ed00d0b6e98 Mon Sep 17 00:00:00 2001 From: Morgan Lombard Date: Tue, 1 Dec 2020 16:17:31 +0100 Subject: [PATCH] test curl dans yml --- .circleci/config.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4513005..e59e27f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,6 +1,4 @@ version: 2 -orbs: - heroku: circleci/heroku@0.0.10 jobs: build: docker: @@ -123,10 +121,15 @@ jobs: - checkout - run: name: Heroku Deploy - command: echo todo && false + command: git push https://heroku:$HEROKU_API_KEY@git.heroku.com/$HEROKU_APP_NAME.git HEAD:main - run: name: Smoke Test - command: echo todo && false + command: |- + HTTPCODE=`curl -s -o /dev/null -w "%{http_code}" https://$HEROKU_APP_NAME.herokuapp.com/` + if [ "$HTTPCODE" -ne 200 ];then + echo "heroku app not responding, failing deploy" + exit 1 + fi workflows: version: 2 @@ -151,7 +154,7 @@ workflows: filters: branches: only: main - - heroku/deploy-via-git: + - back-deploy-heroku: requires: - build - lint