Browse Source

🔧 add test_heroku / modif config.yml

main
Tristan 6 years ago
parent
commit
ef3c056db5
  1. 13
      .circleci/config.yml
  2. 8
      test_heroku.sh

13
.circleci/config.yml

@ -50,17 +50,12 @@ jobs:
- 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
command:
git push https://heroku:$HEROKU_API_KEY@git.heroku.com/$HEROKU_APP_NAME.git HEAD:master
- 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
./test_heroku.sh
docker-build-push:
working_directory: /dockerapp
docker:
@ -91,9 +86,7 @@ workflows:
context: Heroku
requires:
- build
# - test (We don't require test as there's a problem with them atm)
- docker-build-push:
context: Docker
requires:
- build
# - test (We don't require test as there's a problem with them atm)

8
test_heroku.sh

@ -0,0 +1,8 @@
#!/bin/bash
HEROKU_APP_NAME="calm-crag-04725"
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
Loading…
Cancel
Save