|
|
@ -42,4 +42,29 @@ jobs: # A basic unit of work in a run |
|
|
path: test-results |
|
|
path: test-results |
|
|
- store_artifacts: # Upload test summary for display in Artifacts: https://circleci.com/docs/2.0/artifacts/ |
|
|
- store_artifacts: # Upload test summary for display in Artifacts: https://circleci.com/docs/2.0/artifacts/ |
|
|
path: test-results |
|
|
path: test-results |
|
|
destination: tr1 |
|
|
|
|
|
|
|
|
destination: tr1 |
|
|
|
|
|
back-deploy-heroku: |
|
|
|
|
|
docker: |
|
|
|
|
|
- image: buildpack-deps:trusty |
|
|
|
|
|
steps: |
|
|
|
|
|
- checkout |
|
|
|
|
|
- run: |
|
|
|
|
|
name: Heroku Deploy |
|
|
|
|
|
command: echo $HEROKU_APP_NAME |
|
|
|
|
|
git push https://heroku:$HEROKU_API_KEY@git.heroku.com/$HEROKU_APP_NAME.git 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: |
|
|
|
|
|
version: 2 |
|
|
|
|
|
build-and-deploy: |
|
|
|
|
|
jobs: |
|
|
|
|
|
- build |
|
|
|
|
|
- back-deploy-heroku: |
|
|
|
|
|
requires: |
|
|
|
|
|
- build |