{"id":20237,"date":"2023-01-27T07:03:09","date_gmt":"2023-01-27T07:03:09","guid":{"rendered":"https:\/\/www.booksofall.com\/?post_type=product&#038;p=20237"},"modified":"2023-02-07T08:41:21","modified_gmt":"2023-02-07T08:41:21","slug":"ci-cd-for-monorepos","status":"publish","type":"product","link":"https:\/\/www.booksofall.com\/fr\/ci-cd-for-monorepos\/","title":{"rendered":"CI \/ CD for Monorepos"},"content":{"rendered":"<h2><b>Introduction to Monorepos\u00a0<\/b><\/h2>\n<p>Monorepos can be a great force for fostering rapid development workflows. But, are they the right fit for you, your team, and your company?<\/p>\n<h3><b>1.1 What Is a Monorepo?\u00a0<\/b><\/h3>\n<p>Not everyone agrees on a single definition for\u00a0<i>monorepo<\/i>. Some may only accept the term when it applies to companies hosting\u00a0<i>all\u00a0<\/i>their code in a single repository. Google is the most famous example of this; their monorepo is theorized to be the largest code repository in the world, which has thousands of commits per day and exceeds 80 <a href=\"https:\/\/www.techtarget.com\/searchstorage\/answer\/TB-vs-GB-Is-a-terabyte-bigger-than-a-gigabyte\">TB<\/a>s in size.<\/p>\n<p>More relaxed definitions will say that\u00a0<i>a monorepo is a version-controlled code repository holding a number of independently-deployable projects<\/i>. While these projects may be related, they are often separate, logically-independent, and run by different teams. For instance, Airbnb has two monorepos: one for the<a href=\"https:\/\/www.computerscience.org\/bootcamps\/resources\/frontend-vs-backend\/\"> frontend code<\/a> and one for the<a href=\"https:\/\/www.computerscience.org\/bootcamps\/resources\/frontend-vs-backend\/\"> backend code<\/a>. In this way, a company or organization can utilize multiple monorepos.<\/p>\n<p>Monorepos are sometimes also called\u00a0<i>monolithic repositories<\/i>, but they should not be confused with\u00a0<i>monolithic architecture<\/i>, a software development practice for writing centralized applications using a single codebase. To give one example to these kinds of architectures, think of a <a href=\"https:\/\/rubyonrails.org\/\">Ruby on Rails<\/a> application handling websites,<a href=\"https:\/\/smartbear.com\/learn\/performance-monitoring\/api-endpoints\/\"> API endpoints<\/a>, and background jobs all at once.<\/p>\n<h3><b>1.2 Monorepos vs. Multirepos\u00a0<\/b><\/h3>\n<p>The opposite of the monorepo is a\u00a0<i>multirepo<\/i>, or simply\u00a0<i>repos<\/i>, where each project is held on a completely separate, version-controlled software repository. Multirepos come naturally \u2014 it\u2019s what we do when starting a new project. After all, who doesn\u2019t like starting fresh?<\/p>\n<p>Moving from multi to monorepo is merely a matter of moving all your projects into a single repository.<\/p>\n<p>$ mkdir monorepo<br \/>\n$ git init<br \/>\n$ mv ~\/src\/app-android10 ~\/src\/app-android11 ~\/src\/app-ios .<br \/>\n$ git add -A<br \/>\n$ git commit -m &#8220;My first monorepo&#8221;<\/p>\n<p>Of course, this is just to get started. The hard work comes later, when we get into refactoring and consolidation. To enjoy the full benefits of a monorepo, all shareable code should be moved outside of each project folder and into a common location.<\/p>\n<p>Multirepos are not a synonym for\u00a0<i>microservices<\/i>. In fact, having one does not require using the other. Later, we\u2019ll discuss companies using monorepos\u00a0<i>with\u00a0<\/i>microservices. A monorepo can host any number of microservices as long as you carefully set up your Continuous Integration and Delivery (CI\/CD) pipeline1 for deployment.<\/p>\n<h3><b>1.3 What Monorepos Bring to the Table\u00a0<\/b><\/h3>\n<p>At first glance, the choice between monorepos and multirepos might not seem like a big deal. On closer inspection, however, it\u2019s a decision that deeply influences how you and your team interact.<\/p>\n<p>Monorepos have the following benefits:<\/p>\n<ul>\n<li><b>Visibility<\/b>: everyone can see everyone else\u2019s code, leading to better collaboration and cross-team contributions. Any developer can fix a bug in your code before you even notice it.<\/li>\n<li><b>Simpler <a href=\"https:\/\/www.wrike.com\/project-management-guide\/faq\/why-should-i-use-dependency-management-in-project-management-software\/\">dependency management<\/a><\/b>: sharing dependencies is trivial. There\u2019s little need for a complex package manager setups as all modules are hosted in the same repository.<\/li>\n<li><b>Single source of truth<\/b>: one version of every dependency means there are no versioning conflicts and no dependency hell.<\/li>\n<li><b>Consistency<\/b>: enforcing code quality standards and a unified style is straightforward when you have your entire codebase in one place.<\/li>\n<li><b>Shared timeline<\/b>: breaking changes in APIs or shared libraries are immediately exposed, forcing different teams to communicate and join forces. Monorepos keep everyone invested in keeping up with changes.<\/li>\n<li><a href=\"https:\/\/en.wikipedia.org\/wiki\/Atomic_commit\"><b>Atomic commits<\/b><\/a>: atomic commits make large-scale refactoring possible. In theory, a developer can update several packages or projects at once in a single commit. In practice, these types of changes are usually rolled out in stages, not all at once.<\/li>\n<li><b>Implicit CI<\/b>: continuous integration is guaranteed as all the code is already integrated into one place.<\/li>\n<li><b>Unified CI\/CD process<\/b>: you can use the same CI\/CD deployment process for every project in the repo.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p><iframe style=\"width: 100%; height: 750px; border: none;\" src=\"https:\/\/online.visual-paradigm.com\/share\/book\/ci-cd-for-monorepos-18k31ixqq4?p=1\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n","protected":false},"featured_media":20245,"template":"","meta":{"_yoast_wpseo_title":"","_yoast_wpseo_metadesc":"Have you heard of Monorepos? Do you know if it's right for you? Try to learn more about it and use it better in your work!"},"product_brand":[],"product_cat":[289],"product_tag":[314],"class_list":{"0":"post-20237","1":"product","2":"type-product","3":"status-publish","4":"has-post-thumbnail","6":"product_cat-containers","7":"product_tag-new-books","9":"first","10":"instock","11":"shipping-taxable","12":"product-type-simple"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>CI \/ CD for Monorepos - BooksOfAll French<\/title>\n<meta name=\"description\" content=\"Have you heard of Monorepos? Do you know if it&#039;s right for you? Try to learn more about it and use it better in your work!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.booksofall.com\/fr\/ci-cd-for-monorepos\/\" \/>\n<meta property=\"og:locale\" content=\"fr_FR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"CI \/ CD for Monorepos - BooksOfAll French\" \/>\n<meta property=\"og:description\" content=\"Have you heard of Monorepos? Do you know if it&#039;s right for you? Try to learn more about it and use it better in your work!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.booksofall.com\/fr\/ci-cd-for-monorepos\/\" \/>\n<meta property=\"og:site_name\" content=\"BooksOfAll French\" \/>\n<meta property=\"article:modified_time\" content=\"2023-02-07T08:41:21+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.booksofall.com\/fr\/wp-content\/uploads\/sites\/6\/2023\/01\/CI-CD-Monorepos.jpg\" \/><meta property=\"og:image\" content=\"https:\/\/www.booksofall.com\/fr\/wp-content\/uploads\/sites\/6\/2023\/01\/CI-CD-Monorepos.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"595\" \/>\n\t<meta property=\"og:image:height\" content=\"842\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/www.booksofall.com\/fr\/wp-content\/uploads\/sites\/6\/2023\/01\/CI-CD-Monorepos.jpg\" \/>\n<meta name=\"twitter:label1\" content=\"Dur\u00e9e de lecture estim\u00e9e\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.booksofall.com\/fr\/ci-cd-for-monorepos\/\",\"url\":\"https:\/\/www.booksofall.com\/fr\/ci-cd-for-monorepos\/\",\"name\":\"CI \/ CD for Monorepos - BooksOfAll French\",\"isPartOf\":{\"@id\":\"https:\/\/www.booksofall.com\/fr\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.booksofall.com\/fr\/ci-cd-for-monorepos\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.booksofall.com\/fr\/ci-cd-for-monorepos\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.booksofall.com\/fr\/wp-content\/uploads\/sites\/6\/2023\/01\/CI-CD-Monorepos.jpg\",\"datePublished\":\"2023-01-27T07:03:09+00:00\",\"dateModified\":\"2023-02-07T08:41:21+00:00\",\"description\":\"Have you heard of Monorepos? Do you know if it's right for you? Try to learn more about it and use it better in your work!\",\"breadcrumb\":{\"@id\":\"https:\/\/www.booksofall.com\/fr\/ci-cd-for-monorepos\/#breadcrumb\"},\"inLanguage\":\"fr-FR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.booksofall.com\/fr\/ci-cd-for-monorepos\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\/\/www.booksofall.com\/fr\/ci-cd-for-monorepos\/#primaryimage\",\"url\":\"https:\/\/www.booksofall.com\/fr\/wp-content\/uploads\/sites\/6\/2023\/01\/CI-CD-Monorepos.jpg\",\"contentUrl\":\"https:\/\/www.booksofall.com\/fr\/wp-content\/uploads\/sites\/6\/2023\/01\/CI-CD-Monorepos.jpg\",\"width\":\"595\",\"height\":\"842\",\"caption\":\"CI \/ CD for Monorepos\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.booksofall.com\/fr\/ci-cd-for-monorepos\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.booksofall.com\/fr\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Categories\",\"item\":\"https:\/\/www.booksofall.com\/fr\/categories\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"CI \/ CD for Monorepos\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.booksofall.com\/fr\/#website\",\"url\":\"https:\/\/www.booksofall.com\/fr\/\",\"name\":\"BooksOfAll French\",\"description\":\"Biggest IT eBooks library and learning resources - Free eBooks for programming, computing, artificial intelligence and more.\",\"publisher\":{\"@id\":\"https:\/\/www.booksofall.com\/fr\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.booksofall.com\/fr\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"fr-FR\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.booksofall.com\/fr\/#organization\",\"name\":\"BooksOfAll French\",\"url\":\"https:\/\/www.booksofall.com\/fr\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\/\/www.booksofall.com\/fr\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.booksofall.com\/fr\/wp-content\/uploads\/sites\/6\/2022\/06\/booksofall-logo-2.png\",\"contentUrl\":\"https:\/\/www.booksofall.com\/fr\/wp-content\/uploads\/sites\/6\/2022\/06\/booksofall-logo-2.png\",\"width\":166,\"height\":30,\"caption\":\"BooksOfAll French\"},\"image\":{\"@id\":\"https:\/\/www.booksofall.com\/fr\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"CI \/ CD for Monorepos - BooksOfAll French","description":"Have you heard of Monorepos? Do you know if it's right for you? Try to learn more about it and use it better in your work!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.booksofall.com\/fr\/ci-cd-for-monorepos\/","og_locale":"fr_FR","og_type":"article","og_title":"CI \/ CD for Monorepos - BooksOfAll French","og_description":"Have you heard of Monorepos? Do you know if it's right for you? Try to learn more about it and use it better in your work!","og_url":"https:\/\/www.booksofall.com\/fr\/ci-cd-for-monorepos\/","og_site_name":"BooksOfAll French","article_modified_time":"2023-02-07T08:41:21+00:00","og_image":[{"url":"https:\/\/www.booksofall.com\/fr\/wp-content\/uploads\/sites\/6\/2023\/01\/CI-CD-Monorepos.jpg","type":"","width":"","height":""},{"width":595,"height":842,"url":"https:\/\/www.booksofall.com\/fr\/wp-content\/uploads\/sites\/6\/2023\/01\/CI-CD-Monorepos.jpg","type":"image\/jpeg"}],"twitter_card":"summary_large_image","twitter_image":"https:\/\/www.booksofall.com\/fr\/wp-content\/uploads\/sites\/6\/2023\/01\/CI-CD-Monorepos.jpg","twitter_misc":{"Dur\u00e9e de lecture estim\u00e9e":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.booksofall.com\/fr\/ci-cd-for-monorepos\/","url":"https:\/\/www.booksofall.com\/fr\/ci-cd-for-monorepos\/","name":"CI \/ CD for Monorepos - BooksOfAll French","isPartOf":{"@id":"https:\/\/www.booksofall.com\/fr\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.booksofall.com\/fr\/ci-cd-for-monorepos\/#primaryimage"},"image":{"@id":"https:\/\/www.booksofall.com\/fr\/ci-cd-for-monorepos\/#primaryimage"},"thumbnailUrl":"https:\/\/www.booksofall.com\/fr\/wp-content\/uploads\/sites\/6\/2023\/01\/CI-CD-Monorepos.jpg","datePublished":"2023-01-27T07:03:09+00:00","dateModified":"2023-02-07T08:41:21+00:00","description":"Have you heard of Monorepos? Do you know if it's right for you? Try to learn more about it and use it better in your work!","breadcrumb":{"@id":"https:\/\/www.booksofall.com\/fr\/ci-cd-for-monorepos\/#breadcrumb"},"inLanguage":"fr-FR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.booksofall.com\/fr\/ci-cd-for-monorepos\/"]}]},{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/www.booksofall.com\/fr\/ci-cd-for-monorepos\/#primaryimage","url":"https:\/\/www.booksofall.com\/fr\/wp-content\/uploads\/sites\/6\/2023\/01\/CI-CD-Monorepos.jpg","contentUrl":"https:\/\/www.booksofall.com\/fr\/wp-content\/uploads\/sites\/6\/2023\/01\/CI-CD-Monorepos.jpg","width":"595","height":"842","caption":"CI \/ CD for Monorepos"},{"@type":"BreadcrumbList","@id":"https:\/\/www.booksofall.com\/fr\/ci-cd-for-monorepos\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.booksofall.com\/fr\/"},{"@type":"ListItem","position":2,"name":"Categories","item":"https:\/\/www.booksofall.com\/fr\/categories\/"},{"@type":"ListItem","position":3,"name":"CI \/ CD for Monorepos"}]},{"@type":"WebSite","@id":"https:\/\/www.booksofall.com\/fr\/#website","url":"https:\/\/www.booksofall.com\/fr\/","name":"BooksOfAll French","description":"Biggest IT eBooks library and learning resources - Free eBooks for programming, computing, artificial intelligence and more.","publisher":{"@id":"https:\/\/www.booksofall.com\/fr\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.booksofall.com\/fr\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"fr-FR"},{"@type":"Organization","@id":"https:\/\/www.booksofall.com\/fr\/#organization","name":"BooksOfAll French","url":"https:\/\/www.booksofall.com\/fr\/","logo":{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/www.booksofall.com\/fr\/#\/schema\/logo\/image\/","url":"https:\/\/www.booksofall.com\/fr\/wp-content\/uploads\/sites\/6\/2022\/06\/booksofall-logo-2.png","contentUrl":"https:\/\/www.booksofall.com\/fr\/wp-content\/uploads\/sites\/6\/2022\/06\/booksofall-logo-2.png","width":166,"height":30,"caption":"BooksOfAll French"},"image":{"@id":"https:\/\/www.booksofall.com\/fr\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/www.booksofall.com\/fr\/wp-json\/wp\/v2\/product\/20237","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.booksofall.com\/fr\/wp-json\/wp\/v2\/product"}],"about":[{"href":"https:\/\/www.booksofall.com\/fr\/wp-json\/wp\/v2\/types\/product"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.booksofall.com\/fr\/wp-json\/wp\/v2\/media\/20245"}],"wp:attachment":[{"href":"https:\/\/www.booksofall.com\/fr\/wp-json\/wp\/v2\/media?parent=20237"}],"wp:term":[{"taxonomy":"product_brand","embeddable":true,"href":"https:\/\/www.booksofall.com\/fr\/wp-json\/wp\/v2\/product_brand?post=20237"},{"taxonomy":"product_cat","embeddable":true,"href":"https:\/\/www.booksofall.com\/fr\/wp-json\/wp\/v2\/product_cat?post=20237"},{"taxonomy":"product_tag","embeddable":true,"href":"https:\/\/www.booksofall.com\/fr\/wp-json\/wp\/v2\/product_tag?post=20237"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}