comin supports several remotes and each of these remotes can have a
main
and testing
branches. A new commit can be submitted in all of
these branches and comin need to decide which one to choose.
The comin goal is to
- refuse commits push-forced to
main
branches - only allow
testing
branches on top ofmain
branches - prefer commits from
testing
branches
Here is the algorithm used to choose the next commit to deploy:
- Fetch a subset of remotes
- Ensure commits from updated
main
andtesting
branches are not behind the lastmain
deployed commit - Get the first commit from
main
branches (remotes are ordered in the configuration) on top of the last deployedmain
commit. If no such commit exists, comin gets the first commit equal to the last deployedmain
commit. - Get the first
testing
commit on top of the previously chosenmain
commit. If no such commit exists, comin uses the previously chosenmain
commit.