Skip to content

Commit

Permalink
Create two separate workflows for circleci. (#1082)
Browse files Browse the repository at this point in the history
Workflow that deploys requires a git tag to run. Adding a tag filter
would require all other tasks to have a tag as well. Splitting into two
workflows, the build-test flow can work on all other branches/commits
while build-test-deploy only works when a git tag matching vX.X.X is pushed.
  • Loading branch information
tryantwit authored and julianguyen committed Oct 3, 2018
1 parent 6b7d465 commit 3eea31c
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ jobs:
git push https://heroku:$HEROKU_API_KEY@git.heroku.com/ifme.git master
workflows:
version: 2
build-deploy:
build-test:
jobs:
- setup-coverage
- build:
Expand All @@ -139,9 +139,30 @@ workflows:
- upload-coverage:
requires:
- build
build-test-deploy:
jobs:
- setup-coverage
- build:
requires:
- setup-coverage
filters:
branches:
ignore: /.*/
tags:
only: /^v[0-9]+\.[0-9]+\.[0-9]+/
- upload-coverage:
requires:
- build
filters:
branches:
ignore: /.*/
tags:
only: /^v[0-9]+\.[0-9]+\.[0-9]+/
- deploy:
requires:
- upload-coverage
filters:
branches:
only: master
ignore: /.*/
tags:
only: /^v[0-9]+\.[0-9]+\.[0-9]+/

0 comments on commit 3eea31c

Please sign in to comment.