-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e1eb74f
commit 297e9b0
Showing
4 changed files
with
212 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,89 @@ | ||
version: 2.1 | ||
orbs: | ||
heroku: circleci/heroku@0.0.10 | ||
node: circleci/node@2.0.1 | ||
|
||
jobs: | ||
build-and-test: | ||
build: | ||
executor: | ||
name: node/default | ||
steps: | ||
- checkout | ||
- node/with-cache: | ||
steps: | ||
- run: npm install | ||
- run: npm test | ||
- run: npm run build | ||
- run: npm install | ||
- run: npm run test | ||
- run: npm run build | ||
|
||
test: | ||
executor: | ||
name: node/default | ||
steps: | ||
- checkout | ||
- run: npm install | ||
- run: npm run test | ||
|
||
deploy: | ||
executor: | ||
name: node/default | ||
steps: | ||
- checkout | ||
- run: npm install | ||
- run: npm run test | ||
- run: npm run build | ||
- run: | ||
name: Deploy to Heroku | ||
command: bash .circleci/heroku-setup.sh | ||
|
||
|
||
syncBranch: | ||
executor: | ||
name: node/default | ||
steps: | ||
- checkout | ||
- run: | ||
name: Sync Downstream | ||
command: yarn rhinodeploy merge -c build:production | ||
|
||
|
||
workflows: | ||
heroku_deploy: | ||
version: 2 | ||
|
||
general: | ||
jobs: | ||
- test: | ||
filters: | ||
branches: | ||
ignore: | ||
- master | ||
- develop | ||
|
||
deployment: | ||
jobs: | ||
- heroku/deploy-via-git | ||
- build: | ||
filters: | ||
branches: | ||
only: | ||
- master | ||
- develop | ||
- test: | ||
filters: | ||
branches: | ||
only: | ||
- master | ||
- develop | ||
- deploy: | ||
requires: | ||
- build | ||
- test | ||
filters: | ||
branches: | ||
only: | ||
- master | ||
- develop | ||
#- syncBranch: | ||
# requires: | ||
# - deploy | ||
# filters: | ||
# branches: | ||
# only: | ||
# - master | ||
# - staging | ||
# - develop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
|
||
wget -qO- https://cli-assets.heroku.com/install-ubuntu.sh | sh | ||
|
||
cat > ~/.netrc << EOF | ||
machine api.heroku.com | ||
login $HEROKU_LOGIN | ||
password $HEROKU_API_KEY | ||
machine git.heroku.com | ||
login $HEROKU_LOGIN | ||
password $HEROKU_API_KEY | ||
EOF | ||
|
||
echo $CIRCLE_BRANCH | ||
echo $HEROKU_APP | ||
|
||
heroku git:remote -a $HEROKU_APP |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.