{"id":804,"date":"2016-07-12T15:55:34","date_gmt":"2016-07-12T13:55:34","guid":{"rendered":"https:\/\/blog.mi.hdm-stuttgart.de\/?p=804"},"modified":"2023-06-09T14:17:52","modified_gmt":"2023-06-09T12:17:52","slug":"the-new-ci-world-wrapping-it-up-with-git","status":"publish","type":"post","link":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/2016\/07\/12\/the-new-ci-world-wrapping-it-up-with-git\/","title":{"rendered":"The new CI world, Wrapping it up with Git"},"content":{"rendered":"<p class=\"c4 c25\">Nowadays many agile teams work with Git and Feature Branches. A developer works with on a feature and at the end he merges the new feature\u2019s code into the project. However, this concept goes against the principles of CI. Let&#8217;s take a closer look at this practice and find out if the concepts of version control system and CI are somehow compatible.<br \/>\n<!--more--><\/p>\n<p class=\"c4 c25\">Welcome to part 6 &#8211; Man we are on a writing flow! &#8211; of our blog posts series. After all the coding done in the last parts, let\u2019s take a more laid back look at CI and Git.<\/p>\n<h3 id=\"h.f3wc82t10pe2\" class=\"c4 c20\">The Feature branch<\/h3>\n<p class=\"c4\">The basic idea of a feature branch is that when you start working on a feature (or UserStory, if you prefer that term, based on Agile) you make a new branch of the repository and start working on it. Any changes on the project\u2019s code will be done in this branch. The main advantage of feature branching is that each developer can work on their own feature and be isolated from changes going on elsewhere.<\/p>\n<p class=\"c4\">Although developers can develop their features in isolation, at some point their work does have to be integrated. Everything is just fine, if the developers have been working on completely separate parts of the code base with no interaction, in which case the merge will or should go smoothly. But they may be working on code parts that do interact with each other. The problem is the complexity of merging shared source code and dealing with conflicts as developers edited the same files. Martin Flower discusses this, and exposes a big problem e.g. a function rename creates a semantic conflict when merging feature branches. This makes developers fearful to factoring, which makes Feature Branching a bad idea, because once a team is afraid to refactor their code in order to keep it healthy, they are on downward spiral with no pretty end. (http:\/\/martinfowler.com\/bliki\/FeatureBranch.html)<\/p>\n<p class=\"c4\">Another thing to notice is, that feature branching is a different approach to CI. One of the principles of CI is that everyone commits to the main repository every day. So unless feature branches only last less than a day, running a feature branch is a different animal to CI. The teams is probably using a CI server when merging a feature branch and after every merge code will be tested for integration. That&#8217;s continuous building and an awesome thing to have, but there&#8217;s no real integration so it&#8217;s not CI. (http:\/\/martinfowler.com\/bliki\/FeatureBranch.html)<\/p>\n<h3 id=\"h.dtue6kjas06r\" class=\"c4 c20\">The mainline<\/h3>\n<p class=\"c4\">Based on agile and CI, communication is one of the key factors in software development. One of CI&#8217;s most important features is that it facilitates human communication. When using CI and Git, developers should merge their changes often and don&#8217;t wait for a big merge to happen at the end of the development of a feature. By doing this, CI is effective at removing the problem of big merges, but it&#8217;s also a vital communication mechanism. And all of this can be &nbsp;accomplished through a mainline. This means to mark one branch on the repository as the mainline. If everyone pulls and pushes to the main branch every day, then you have a CI mainline.&nbsp;Indeed with a disciplined team, it is a good idea to use Git on a CI project.<\/p>\n<p class=\"c4\">With CI, the mainline must always be healthy, so in theory (and often in practice) you can safely release after any commit. Having a half built feature or a feature you&#8217;d rather not release yet won&#8217;t damage the other functionality of the software, but may require some masking if you don&#8217;t want it to be visible in the user-interface. This can be as simple as not including a menu item in the UI to trigger the feature. With CI the mainline acts as a communication point. An up-to-date mainline also makes it easy for someone to be sure they are integrating with everyone, they don&#8217;t have to poke around to find out who is doing what &#8211; so less chance of some changes being hidden until a late integration.<\/p>\n<p class=\"c4\">Although many people associate Git with feature branching, it can be used with CI. All you need to do is mark one branch on the repository as the mainline. And the team should control that everyone pulls and pushes to it every day. An important condition is have a disciplined team, that takes the task of keeping the mainline clean, up-to-date, makes sure that new features are hidden in the user-interface until fully implemented.<\/p>\n<h3 id=\"h.2tritenqje4i\" class=\"c4 c20\">Conclusion<\/h3>\n<p class=\"c4\">Moving to Continuous Deployment will change your development dramatically. It will make you more productive and lead to a more stable and better product. There are steps like what tools to use and get a good idea of how they interact with each other. Once set up, you can then reap the benefits of deploying new versions several times a day. The main goal should always be to create a process to build a better product for your users, and at the same time make the life of the developers easier.<\/p>\n<p class=\"c4\">From a technical perspective, CI helps teams work more efficiently. These teams can be cross-functional, creating hardware and software that works together. They can be geographically distributed, because the constant integration work will ensure that you don&#8217;t get deviating designs. People can work on a large team, because the different components of a complex system will more assuredly work together. It solves many of the early pitfalls that these nontraditional agile teams might have experienced without CI. Combining CI with test-driven development puts more people under the agile umbrella, because it allows agile methods to work more efficiently.<\/p>\n<p class=\"c4\">From a business perspective, CI offers better business results by allowing teams to have their cake and eat it too. That is, they can bring products to market faster, by finding issues when they are young and small, not waiting until they are large and more difficult to fix. They can also respond better to requirements that are introduced while the product is being developed. This creates a better product for the customer, which is the real promise of agility.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Nowadays many agile teams work with Git and Feature Branches. A developer works with on a feature and at the end he merges the new feature\u2019s code into the project. However, this concept goes against the principles of CI. Let&#8217;s take a closer look at this practice and find out if the concepts of version [&hellip;]<\/p>\n","protected":false},"author":29,"featured_media":805,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1,659,650,651,2],"tags":[],"ppma_author":[684],"class_list":["post-804","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-allgemein","category-devops","category-scalable-systems","category-system-designs","category-system-engineering"],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2016\/07\/Screen-Shot-2016-07-12-at-3.54.55-PM.png","jetpack-related-posts":[{"id":770,"url":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/2018\/06\/08\/the-new-ci-world-wrapping-it-up-with-git-2\/","url_meta":{"origin":804,"position":0},"title":"The new CI world, Wrapping it up with Git","author":"Mario Erazo","date":"8. June 2018","format":false,"excerpt":"Welcome to part 6 - Man we are on a writing flow! - of our blog posts series. After all the coding done in the last parts, let\u2019s take a more laid back look at CI and Git. Nowadays many agile teams work with Git and Feature Branches. A developer\u2026","rel":"","context":"In &quot;DevOps&quot;","block_context":{"text":"DevOps","link":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/category\/scalable-systems\/devops\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":305,"url":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/2016\/02\/17\/jenkbird-the-art-of-deployment-tutorial-part-2\/","url_meta":{"origin":804,"position":1},"title":"Jenkbird &#8211; The art of deployment &#8211; Part 2","author":"J\u00f6rg Einfeldt","date":"17. February 2016","format":false,"excerpt":"\u00a0 One stage. Two stages. THREE STAGES FOR DEPLOYMENT! \u2014 Count von Count on his deployment pipeline Hi, it's us again, the guys with the strange idea of using Sesame Street characters in a blog series about CI.\u00a0Since we didn't really cover the reasons, why you should use CD \/\u2026","rel":"","context":"In &quot;DevOps&quot;","block_context":{"text":"DevOps","link":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/category\/scalable-systems\/devops\/"},"img":{"alt_text":"count_dracula","src":"https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2016\/02\/count_dracula-300x300.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":10714,"url":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/2020\/09\/29\/getting-started-with-devops\/","url_meta":{"origin":804,"position":2},"title":"Getting Started with your first Software Project using DevOps","author":"bg037","date":"29. September 2020","format":false,"excerpt":"This Post is a getting started guide for creating a DevOps enabled web based software project.","rel":"","context":"In &quot;Cloud Technologies&quot;","block_context":{"text":"Cloud Technologies","link":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/category\/scalable-systems\/cloud-technologies\/"},"img":{"alt_text":"Getting Started with DevOps cover image","src":"https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2020\/08\/cover-image.jpg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2020\/08\/cover-image.jpg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2020\/08\/cover-image.jpg?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2020\/08\/cover-image.jpg?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2020\/08\/cover-image.jpg?resize=1050%2C600&ssl=1 3x"},"classes":[]},{"id":1924,"url":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/2017\/02\/28\/microservices-legolizing-software-development-4\/","url_meta":{"origin":804,"position":3},"title":"Microservices \u2013 Legolizing Software Development IV","author":"Calieston Varatharajah, Christof Kost, Korbinian Kuhn, Marc Schelling, Steffen Mauser","date":"28. February 2017","format":false,"excerpt":"An automated development environment will save you. We explain how we set up Jenkins, Docker and Git to work seamlessly together.","rel":"","context":"In &quot;System Designs&quot;","block_context":{"text":"System Designs","link":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/category\/system-designs\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2017\/02\/draw_io_docker_small-1024x439.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2017\/02\/draw_io_docker_small-1024x439.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2017\/02\/draw_io_docker_small-1024x439.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":4405,"url":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/2019\/01\/04\/radcup-part-3-automation\/","url_meta":{"origin":804,"position":4},"title":"Radcup Part 3 &#8211; Automation with Gitlab CI\/CD","author":"Immanuel Haag","date":"4. January 2019","format":false,"excerpt":"Written by: Immanuel Haag, Christian M\u00fcller, Marc R\u00fcttler The goal of this blog entry is to automate the previously performed steps. At the end all manual steps should be automated when new code changes are added to the repository. The new version of the backend will be made available in\u2026","rel":"","context":"In &quot;DevOps&quot;","block_context":{"text":"DevOps","link":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/category\/scalable-systems\/devops\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2019\/01\/Gesamtstruktur-der-Architektur-Kurzform-1.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2019\/01\/Gesamtstruktur-der-Architektur-Kurzform-1.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2019\/01\/Gesamtstruktur-der-Architektur-Kurzform-1.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2019\/01\/Gesamtstruktur-der-Architektur-Kurzform-1.png?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2019\/01\/Gesamtstruktur-der-Architektur-Kurzform-1.png?resize=1050%2C600&ssl=1 3x"},"classes":[]},{"id":4005,"url":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/2018\/08\/20\/cloud-security-tools-and-recommendations-for-devops-in-2018\/","url_meta":{"origin":804,"position":5},"title":"Cloud security tools and recommendations for DevOps in 2018","author":"Immanuel Haag","date":"20. August 2018","format":false,"excerpt":"Introduction Over the last five years, the use of cloud computing services has increased rapidly, in German companies. According to a statistic from Bitkom Research in \u00a02018, the acceptance of cloud-computing services is growing. Cloud-computing brings many advantages for a business. For example, expenses for the internal infrastructure and its\u2026","rel":"","context":"In &quot;DevOps&quot;","block_context":{"text":"DevOps","link":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/category\/scalable-systems\/devops\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2023\/08\/19AAsLm7ATw8Fl8aVbJQdYw.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2023\/08\/19AAsLm7ATw8Fl8aVbJQdYw.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2023\/08\/19AAsLm7ATw8Fl8aVbJQdYw.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]}],"jetpack_sharing_enabled":true,"authors":[{"term_id":684,"user_id":29,"is_guest":0,"slug":"me083","display_name":"Mario Erazo","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/0073577e41cafa4dfb6d94b3a8fbeb156decdfde755af62c0e40f88b9f9b4348?s=96&d=mm&r=g","0":null,"1":"","2":"","3":"","4":"","5":"","6":"","7":"","8":""}],"_links":{"self":[{"href":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/wp-json\/wp\/v2\/posts\/804","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/wp-json\/wp\/v2\/users\/29"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/wp-json\/wp\/v2\/comments?post=804"}],"version-history":[{"count":2,"href":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/wp-json\/wp\/v2\/posts\/804\/revisions"}],"predecessor-version":[{"id":24681,"href":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/wp-json\/wp\/v2\/posts\/804\/revisions\/24681"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/wp-json\/wp\/v2\/media\/805"}],"wp:attachment":[{"href":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/wp-json\/wp\/v2\/media?parent=804"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/wp-json\/wp\/v2\/categories?post=804"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/wp-json\/wp\/v2\/tags?post=804"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/wp-json\/wp\/v2\/ppma_author?post=804"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}