| There's a number of startups doing some variation of this. What many don't seem aware of is that plain pull requests, in combination with CI, entirely kill the need for a deploy app/bot. This is how I do it at my current company: * use plain git flow (master/develop, hotfixes, etc)
* use additional explicit branches per deployment target (e.g. master-spain for http://myapp.es, master-mexico for http://myapp.mx).
* Protect these branches using github/bitbucket 'protected branches'.
* open a PR from master to master-spain for performing a deploy of said target, detailng nicely what is being deployed and why.
* instruct CI to deploy my app on each build of master-spain. master and develop are never deployed.
This setup has the same benefits (and then some more) than competitors: * Explicit deployment authors, reasons, timestamps
* Impossible to deploy red code
* Impossible to deploy code not in master
* Impossible to deploy concurrently to the same target
Hope it helps someone! |
The history of my production deploys is not monotonically forward: if something breaks, it rolls back. Nor does production roll forward as one piece: different components of the stack roll in separate motions (the db schema vs the frontend servers for example).
Git, tied to the project dev history, does not well represent these things. Reverts in the deploy branch are not semantically identical to rollbacks in production: and it's not necessarily safe or wise to merge them back into dev history.
A separate git repo, referencing release numbers, or dev repo commit hashes, would work pretty well on the other hand...