|
|
@ -54,6 +54,23 @@ jobs: |
|
|
environment: |
|
|
environment: |
|
|
DATABASE_URL: postgres://$PG_USER:$PG_PASSWORD@localhost:5432/$PG_USER |
|
|
DATABASE_URL: postgres://$PG_USER:$PG_PASSWORD@localhost:5432/$PG_USER |
|
|
|
|
|
|
|
|
|
|
|
back-deploy-heroku: |
|
|
|
|
|
docker: |
|
|
|
|
|
- image: buildpack-deps:trusty |
|
|
|
|
|
steps: |
|
|
|
|
|
- checkout |
|
|
|
|
|
- run: |
|
|
|
|
|
name: Heroku Deploy |
|
|
|
|
|
command: 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://$HEROKU_APP_NAME.herokuapp.com/` |
|
|
|
|
|
if [ "$HTTPCODE" -ne 200 ];then |
|
|
|
|
|
echo "heroku app not responding, failing deploy" |
|
|
|
|
|
exit 1 |
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
workflows: |
|
|
workflows: |
|
|
version: 2 |
|
|
version: 2 |
|
|
build-test-and-lint: |
|
|
build-test-and-lint: |
|
|
@ -68,3 +85,11 @@ workflows: |
|
|
- back-test-e2e: |
|
|
- back-test-e2e: |
|
|
requires: |
|
|
requires: |
|
|
- build |
|
|
- build |
|
|
|
|
|
- back-deploy-heroku: |
|
|
|
|
|
requires: |
|
|
|
|
|
- build |
|
|
|
|
|
- lint |
|
|
|
|
|
- back-test-unit |
|
|
|
|
|
filters: |
|
|
|
|
|
branches: |
|
|
|
|
|
only: main |