I recently reviewed some workflows for Mercurial since we started using it for our web development. We need an automated way to propagate changes that are transferred to test and live instances to multiple endpoints. Here is an outline of the idea:
+-------+ |Dev | | | +-------+ | Push +--------+ | V +-------+ Push +-------+ |Live |<--------|Test | |server | |server | +-------+ +-------+ | +-------+ | +-------+ +--->|Live 1 | +--->|Test 1 | | | | | | | | +-------+ | +-------+ | | | +-------+ | +-------+ +--->|Live 2 | +--->|Test 2 | | | | | | | | +-------+ | +-------+ | | | +-------+ | +-------+ +--->|Live 3 | +--->|Test 3 | | | | | +-------+ +-------+
Basically, the idea is that all we, as developers, will have to do is when the developer reaches a stable level, issue the push command (which does not have to be just hg push ) to the test server, and from there it will automatically spread out. Then, once the testing is complete, we will push it out of the test to live (or, if it were easier, we could click from dev to live), and this would also apply to each of the different instances.
It would be nice if we could easily add new test and live instances (for example, it is possible if the IP addresses were stored in a database that could be read by script, etc.).
What would be the best way to achieve this? I know about Mercury hooks. Maybe in a script process that the hook will be launched? I also reviewed Fabric , would that be a good option?
Also, what support software would each endpoint have to use? Would it be easier if Mercurial storage existed on every server? Will access to SSH be useful? Etc ...
source share