I know this question is not specifically related to CircleCI, but we’re moving to CircleCI 2.0 and I’d appreciate if someone could give me insights on how to improve our current CI flow in order to make it easier to deploy things faster and multiple times a day.
Here’s how our current flow works today:
- We have two stable branches: master and develop
- We create feature branches (from the develop branch) in order to develop new features
- Whenever a feature branch is complete, we create a Pull Request to merge it back into develop branch
- Every PR merged or commit done in develop branch is automatically deployed to our staging environment
- We test the feature in our staging environment
- After test is complete, we create a new PR to merge develop branch into master branch
- Every PR merged or commit done in master branch is automatically deployed to our production environment
This works, but there are some problems I can see with this approach:
- We always need to create 2 PRs, 1 to merge into develop branch and 1 to merge into master branch
- If we find problems when testing in staging environment, we can’t deploy other unrelated features until these problems are fixed, as the unstable code is already merged into develop branch.
We already have pretty good test coverage, but we can’t skip testing in staging environment yet.
What changes do you suggest in this CI flow in order to allow faster deploys to production?