{"id":3649,"date":"2019-01-08T00:59:56","date_gmt":"2019-01-08T06:59:56","guid":{"rendered":"https:\/\/www.supportpro.com\/blog\/?p=3649"},"modified":"2019-10-30T02:21:32","modified_gmt":"2019-10-30T08:21:32","slug":"ci-cd","status":"publish","type":"post","link":"https:\/\/www.supportpro.com\/blog\/ci-cd\/","title":{"rendered":"CI\/CD (Continuous Integration \/ Continuous Deployment)"},"content":{"rendered":"<p style=\"text-align: center;\"><a class=\"lightbox\" href=\"https:\/\/www.supportpro.com\/requestquote.php\"><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter wp-image-3652\" src=\"https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2018\/12\/ci-cd.png\" alt=\"DevOps -software development cycle\" width=\"500\" height=\"258\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">Continuous Integration (CI) and Continuous Deployment (CD) defines\u00a0a culture, a set of operating\/manipulating principles, and collection of practices that allow application development teams to deliver code changes more regularly and in an accurate way.<\/span><\/p>\n<p><!--more--><\/p>\n<p><span style=\"font-weight: 400;\">Execution is also known as the CI\/CD pipeline and is one of the best practices for DevOps teams to implement.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">CI is a concept, which has been taken as a standard or a parameter nowadays, within our IT services and development.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">The concept of continuous integration means automating the overall deployment process for an application after a code has been committed so as to identify and address the pain points before they become serious issues. So each time a product code is developed, it goes through an automatic CI process.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">There are several tools for Continuous Integration to help trigger these builds and tests.<\/span><\/p>\n<p style=\"text-align: center;\"><a class=\"lightbox\" href=\"https:\/\/www.supportpro.com\/freecheckup.php\"><img decoding=\"async\" class=\"aligncenter wp-image-3655\" src=\"https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2018\/12\/ci-cd2.png\" alt=\"Continuous Integration- software development practice\" width=\"340\" height=\"329\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">Continuous Integration is a software development practice where members of a team integrate their work frequently.\u00a0 Usually, each person integrates at least daily &#8211; leading to multiple integrations per day.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Each integration is verified by an automated build (including test) to detect integration errors as quickly as possible.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">CI is a coding process and set of practices that operate development teams to implement small changes and check in code to version control repositories regularly. Since most new applications require developing code in different platforms and tools, the team needs a mechanism to integrate and check its changes.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Developers practicing CI merge their changes back to the main branch as often as achieved. Developer&#8217;s changes are checked by creating a build and running automated tests against the build. So we avoid the integration hell that usually happens when people wait for release day to combine their changes into the release branch.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">CI is a widely established development practice in the software development industry, in which members of a team integrate and merge development work (e.g., code) frequently, for example, multiple times per day.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">CI enables software companies to have shorter and frequent release cycle, improve software quality, and increase their team&#8217;s productivity. This practice includes automated software building and testing.<\/span><\/p>\n<p style=\"text-align: center;\"><a class=\"lightbox\" href=\"https:\/\/www.supportpro.com\/freecheckup.php\"><img decoding=\"async\" class=\"aligncenter wp-image-3659\" src=\"https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2018\/12\/ci-cd4.png\" alt=\"CI -automated software building and testing.\" width=\"637\" height=\"316\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">Continuous DElivery (CDE) is aimed at ensuring an application is always at production &#8211; ready state after successfully passing automated tests and quality checks.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">CDE employs a set of practices e.g., CI, and deployment automation to deliver software automatically to a production-like environment.<br \/>\nAccording to, this practice offers several benefits such as reduced deployment risk, lower costs and getting user feedback faster.<\/span><\/p>\n<p style=\"text-align: center;\"><a class=\"lightbox\" href=\"https:\/\/www.supportpro.com\/requestquote.php\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-3660\" src=\"https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2018\/12\/ci-cd5.png\" alt=\"CDE -deployment automation \" width=\"772\" height=\"206\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">The figure indicates that having continuous delivery practice requires continuous integration practice.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Continuous Deployment (CD) practice goes a step further and automatically and continuously deploys the application to production or customer environments.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">There is a robust debate in academic and industrial circles about defining and distinguishing between continuous deployment and continuous delivery. What differentiates continuous deployment from continuous delivery is a production environment (i.e., actual customers): the goal of continuous deployment practice is to automatically and steadily deploy every change into the production environment. It is important to note that CD practice implies CDE practice but the converse is not true.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">While the final deployment in CDE is a manual step, there should be no manual steps in CD, in which as soon as developers commit a change, the change is deployed to production through a deployment pipeline.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">CDE practice is a pull-based approach for which a business decides what and when to deploy; CD practice is a push-based approach.<br \/>\nIn other words, the scope of CDE does not include frequent and automated release, and CD is consequently a continuation of CDE. But CDE practice can be applied to all types of systems and organizations, CD practice may only be suitable for certain types of organizations or systems.<\/span><\/p>\n<p><strong>Continuous Integration Practices<\/strong><\/p>\n<p><span style=\"font-weight: 400;\">We have to have some standard practices to be followed by the starting of the project:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Maintain a single-source repository<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Make your build self-testing<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Automate the build<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Everyone commits to the mainline every day<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Every commit should build the mainline on an integration machine<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Fix broken builds immediately<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Keep the build fast<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Make it transparent<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Test in a clone of the production environment<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Make it easy for anyone to get the latest executable<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Automate deployment<\/span><\/li>\n<\/ul>\n<p><strong>CI \u2013 What does it really mean?<\/strong><\/p>\n<p><span style=\"font-weight: 400;\">At a regular frequency (ideally at every commit), the system is:-<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Integrated:\u00a0<\/span><span style=\"font-weight: 400;\">All changes up until that point are combined into the project.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Built:\u00a0<\/span><span style=\"font-weight: 400;\">The code is compiled into an executable or package.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Tested:\u00a0<\/span><span style=\"font-weight: 400;\">Automated test suites are run.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Archived:\u00a0<\/span><span style=\"font-weight: 400;\">Versioned and stored so it can be distributed as if desired.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Deployed:\u00a0<\/span><span style=\"font-weight: 400;\">Loaded onto a system where the developers can interact with it.<\/span><\/p>\n<p><strong>CI \u2013 Benefits<\/strong><\/p>\n<ul>\n<li><span style=\"font-weight: 400;\">Immediate bug detection<\/span><\/li>\n<li><span style=\"font-weight: 400;\">No integration step in the life cycle<\/span><\/li>\n<li><span style=\"font-weight: 400;\">A deployable system at any given point<\/span><\/li>\n<li><span style=\"font-weight: 400;\">Record of the evolution of the project.<\/span><\/li>\n<\/ul>\n<p><strong>CI \u2013 The tools<\/strong><\/p>\n<p><span style=\"font-weight: 400;\">-Code Repositories: SVN, Mercurial, Git<\/span><\/p>\n<p><span style=\"font-weight: 400;\">-Continuous Build Systems: Jenkins, Bamboo, Cruise Control<\/span><\/p>\n<p><span style=\"font-weight: 400;\">-Test Frameworks: JUnit, Cucumber, CppUnit<\/span><\/p>\n<p><span style=\"font-weight: 400;\">-Artifact Repositories: Nexus, Artifactory, Archiva<\/span><\/p>\n<p><strong>CI\/CD in Web Service Validation<\/strong><\/p>\n<p style=\"text-align: center;\"><a class=\"lightbox\" href=\"https:\/\/www.supportpro.com\/requestquote.php\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-3663\" src=\"https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2018\/12\/ci-cd6.png\" alt=\"CI\/CD -Web Service Validation\" width=\"421\" height=\"427\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">In conclusion, continuous integration, continuous delivery, and continuous deployment discuss on how they can be used to build and release well-tested software safely and quickly. These processes leverage extensive automation and encourage constant code sharing to fix defects early. While the techniques, processes, and tools needed to implement these solutions represent a significant challenge, the benefits of a well-designed and properly used system can be very large in size.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Continuous Integration (CI) and Continuous Deployment (CD) defines\u00a0a culture, a set of operating\/manipulating principles, and collection of practices that allow application development teams to deliver code changes more regularly and&hellip;<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_lmt_disableupdate":"","_lmt_disable":"","footnotes":""},"categories":[69,72,67,3],"tags":[],"class_list":["post-3649","post","type-post","status-publish","format-standard","hentry","category-aws","category-cloud","category-devops","category-technical-articles"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts\/3649","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/comments?post=3649"}],"version-history":[{"count":25,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts\/3649\/revisions"}],"predecessor-version":[{"id":4039,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts\/3649\/revisions\/4039"}],"wp:attachment":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/media?parent=3649"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/categories?post=3649"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/tags?post=3649"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}