diff --git a/.circleci/config.yml b/.circleci/config.yml index dd8f9d1..1e601fb 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -54,7 +54,7 @@ jobs: at: /tmp - run: name: Deploy app - command: echo todo && false + command: npx netlify-cli deploy --prod --dir /tmp/server-doc --message "déploiement" --site "0e3c2f9f-5400-4203-9deb-04b416524c66" back-test-unit: docker: - image: circleci/node:dubnium-browsers @@ -121,55 +121,7 @@ jobs: - checkout - run: name: Heroku Deploy - command: echo todo && false + command: git push https://heroku:5730951c-f7d5-4cfd-8aea-c0cae3adc0d2@git.heroku.com/whispering-garden-62583.git HEAD:master - run: name: Smoke Test - command: echo todo && false - -workflows: - version: 2 - build-test-and-lint: - jobs: - - build - - back-test-unit: - requires: - - build - - back-test-e2e: - requires: - - build - - lint: - requires: - - build - - docker-build-and-push: - requires: - - build - - lint - - back-test-e2e - - back-test-unit - filters: - branches: - only: main - - back-deploy-heroku: - requires: - - build - - lint - - back-test-e2e - - back-test-unit - filters: - branches: - only: main - - server-doc-build: - requires: - - build - - lint - - back-test-e2e - - back-test-unit - filters: - branches: - only: main - - server-doc-deploy: - requires: - - server-doc-build - filters: - branches: - only: main + command: ./testMaster-III-TP-CD.sh diff --git a/testMaster-III-TP-CD.sh b/testMaster-III-TP-CD.sh new file mode 100644 index 0000000..f7beaf5 --- /dev/null +++ b/testMaster-III-TP-CD.sh @@ -0,0 +1,5 @@ +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