|
|
|
@ -1,8 +1,4 @@ |
|
|
|
version: 2 |
|
|
|
|
|
|
|
orbs: |
|
|
|
heroku: circleci/heroku@1.2.3 |
|
|
|
|
|
|
|
jobs: |
|
|
|
build: |
|
|
|
docker: |
|
|
|
@ -58,7 +54,7 @@ jobs: |
|
|
|
at: /tmp |
|
|
|
- run: |
|
|
|
name: Deploy app |
|
|
|
command: git push heroku main |
|
|
|
command: git push https://heroku/$HEROKU_API_KEY@git.heroku.com/$HEROKU_APP_NAME.git main |
|
|
|
back-test-unit: |
|
|
|
docker: |
|
|
|
- image: circleci/node:dubnium-browsers |
|
|
|
@ -117,11 +113,15 @@ jobs: |
|
|
|
docker tag app $DOCKER_HUB_USER_ID/my-awesome-ci-expr:latest |
|
|
|
docker push $DOCKER_HUB_USER_ID/my-awesome-ci-expr:$CIRCLE_BUILD_NUM |
|
|
|
docker push $DOCKER_HUB_USER_ID/my-awesome-ci-expr:latest |
|
|
|
deploy: |
|
|
|
executor: heroku/default |
|
|
|
|
|
|
|
back-deploy-heroku: |
|
|
|
docker: |
|
|
|
- image: buildpack-deps:trusty |
|
|
|
steps: |
|
|
|
- checkout |
|
|
|
- heroku/install |
|
|
|
- run: |
|
|
|
name: Heroku Deploy |
|
|
|
command: git push https://heroku/$HEROKU_API_KEY@git.heroku.com/$HEROKU_APP_NAME.git main |
|
|
|
- run: |
|
|
|
name: Smoke Test |
|
|
|
command: | |
|
|
|
@ -130,22 +130,6 @@ jobs: |
|
|
|
echo "heroku app not responding, failing deploy" |
|
|
|
exit 1 |
|
|
|
fi |
|
|
|
# back-deploy-heroku: |
|
|
|
# docker: |
|
|
|
# - image: buildpack-deps:trusty |
|
|
|
# steps: |
|
|
|
# - checkout |
|
|
|
# - run: |
|
|
|
# name: Heroku Deploy |
|
|
|
# command: git push heroku 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 |
|
|
|
@ -161,16 +145,7 @@ workflows: |
|
|
|
- lint: |
|
|
|
requires: |
|
|
|
- build |
|
|
|
# - back-deploy-heroku: |
|
|
|
# requires: |
|
|
|
# - build |
|
|
|
# - lint |
|
|
|
# - back-test-e2e |
|
|
|
# - back-test-unit |
|
|
|
# filters: |
|
|
|
# branches: |
|
|
|
# only: main |
|
|
|
- server-doc-build: |
|
|
|
- back-deploy-heroku: |
|
|
|
requires: |
|
|
|
- build |
|
|
|
- lint |
|
|
|
@ -179,21 +154,18 @@ workflows: |
|
|
|
filters: |
|
|
|
branches: |
|
|
|
only: main |
|
|
|
- server-doc-deploy: |
|
|
|
requires: |
|
|
|
- server-doc-build |
|
|
|
filters: |
|
|
|
branches: |
|
|
|
only: main |
|
|
|
- deploy: |
|
|
|
- server-doc-build: |
|
|
|
requires: |
|
|
|
- build |
|
|
|
- heroku/deploy-via-git: |
|
|
|
requires: |
|
|
|
- deploy |
|
|
|
- lint |
|
|
|
- back-test-e2e |
|
|
|
- back-test-unit |
|
|
|
filters: |
|
|
|
branches: |
|
|
|
only: main |
|
|
|
- server-doc-deploy: |
|
|
|
requires: |
|
|
|
- server-doc-build |
|
|
|
filters: |
|
|
|
branches: |
|
|
|
only: main |