Are there Git workflows for roll-out web applications?
My team of about a dozen developers build a web application in a rolling release model: once a feature set is ready, it is reviewed by a senior developer and inserted into the QA system and then into the production system. This usually happens several times during the working day.
The VCS used is SVN and is pushing for QA and the production system is running with a weird built-in deployment tool that runs on SVN but is file-based (so if you need to push a new version of the file X and X undo changes from some other set changes you don't want to push yet, you have a problem).
I am planning on evangelizing to migrate to Git, so I am thinking above what the workflow might look like. The usual suggestions like the often-linked successful Git branching model don't apply as we don't have versioned versions.
Question 1: Are there any documented workflows that I could look at for further inspiration, similar to the ones above, that are optimized for calendar releases? Or would you suggest one?
I tried to simulate a paper workflow that typically uses feature branches and master, and has additional branches that reflect the OK and production servers state. (One might just merge there from the master.)
The problem I cannot get over is that something in the original is not ready for release for some reason. For example, suppose the branch of function foo is considered complete, merged into master, and pushed into branch qa. This then happens for the function branch panel as well. Now in the QA system, we find that foo is broken and needs more development, while the bar is ready to be entered into the production system. But there is no commit on the master, which includes a bar but not foo, so what are we going to push? The only thing that comes to mind is to revert the merge commit for foo to master. (Behind the link, Linus explains several merge commit issues.)
Question 2: Any idea how to overcome this problem more elegantly?
source to share
Here's a workflow I've used with great success:
- Each developer is working on their own features / fixes
-
Once satisfied with the work, he pushes the branch to the remote
git push -u origin newfeature
-
QA or test [server | man | command] pulls master and branch of the feature you want to release and merges it into master, but doesn't push to remote
- When the function is QA'ed it is merged with -no-ff and pushed into master
-
Now you can delete the function branch
git push origin: newfeature
-
The live server always pulls from the master
For us, this ensures that the live server contains a rolling release of the current "best" code.
If you are interested in the branching model, I found this to be very useful: nvie.com/posts/a-successful-git-branching-model/
source to share
Don't forget that with DVCS you have more than just a merge workflow, but a push / pull workflow between repositories.
When evaluating a feature, you don't need to influence master
your repo.
You can push to a branch of a feature
separate QA repo.
- If the tests pass, it is
QA/master
updated, and all developers can pull outmaster
of QA to update their master, while maintaining development of other features (they will rebuild their local branchesfeature
on top of their updatedmaster
). - If the test fails,
QA/master
remain untouched.
source to share
Here's a good slideshow to think about. Nothing is perfect, try to meet your needs as much as possible.
Git Release Management Workflow
https://speakerdeck.com/ewoodh2o/release-management-git-workflow
source to share