Reputation: 2007
I am migrating from clearcase to GIT. In clearcase I had the "checkout" feature on files, which indicated work on that file and prevented others (on the stream) from editing the file, and avoided merging. Now, in GIT we are experiencing a lot of merging which is OK, but I wanted to ease the merges using CI.
This is what I had in mind:
However, I know that the common practice is to hook the commit and run a CI process at that time.
GIT maintains almost everything locally and avoids server side calls, and I fill that hooking the git commit to the CI process undermines this advantage of GIT.
So, a few questions:
Thank you
Upvotes: 0
Views: 92
Reputation: 3
My suggestion is to purchase the book: Continuous Delivery: Reliable Software Releases through Build, Test, and Deployment Automation (Addison-Wesley Signature Series (Fowler)) - Humble, Jez, Farley, David
The book outlines a good process and framework for continuous integration. I believe that the responsibility is on your Developers to ensure that the code compiles, merges and passes high level functional test BEFORE they commit to the main branch which triggers the automated build. The Developers also need to commit to fix any issues with the automated build output IMMEDIATELY. Your CI tool set needs to communicate the status of the automated builds and tests and Management needs to ensure that failures are the highest priority for the Development teams to fix.
Upvotes: 0
Reputation: 26555
I seems like you are trying to emulate the old clearcase induced workflow by means of git. This is usually not a good idea. (Even though your team is used to the good old workflow.)
If clearcase works fine for you, just stick with clearcase. If you had a good reason to switch to git, use the chance to look at you business workflows and build a suitable git workflow around it.
Ask yourself some questions:
Next set up some meaningful branches. Currently it seems like you are doing all your work on one single master branch, but branches in git are extremely lightweight you really should think about developing features in separate branches and do explicit merges.
Please don't abuse your CI system to push commits around and enforce automatic merges unless you have a very good reason for this. A "push" usually means, you have finished your work and are ready to share it with your other team members. Your CI system usually cannot decide whether the work is finished or in some buggy experimental state.
I would recommend setting up a some branches, give them a good semantic and set up you CI system to check those branches whenever they are updated. - Things like push and merge should always be done explicitly and intentional by a real person. Otherwise strange things will happen, sooner or later.
But all of this depends on your specific situation. There is no recipe which works for everyone.
Upvotes: 3