What is Continuous Integration?
Like many other agile methodology procedures, one of the main functions of the CI (Continuous Integration) is to facilitate the work for the developer.
When we talk about Continuous integration, we refer to the creation of code between different developers and under a thorough review of it. To make this possible and easy, it is not expected that the code is finalized, as was done in conventional or cascade methods, but that the work is divided into small tasks, also called sprints, which do not involve a great effort or a great investment of time, so that these tasks can be reviewed frequently.
Definition
It is the automated process to assemble and test executable versions of the software, so that the development team can build and test the software they are working on several times a day.
This concept is known as “continuous integration” and is one of the practices of Extreme Programming, however it is not necessary to be following Extreme Programming to apply it.
Continuous integration is a development practice that requires developers to integrate the code into a shared repository several times a day. Each record is then verified by automated compilation, which allows teams to detect problems at an early stage. By integrating regularly, you can detect errors quickly and locate them more easily.
To take into account: When talking about "integrating" software, it refers to the specific process of generating an executable version of a software, which may involve compiling the source code, packaging, including configuration files, etc.
Characteristics
Like many other Agile methodology procedures, one of the main functions of Continuous Integration, according to Duvall, Matyas, and Glover (2007), when talking about continuous integration, it refers to the creation of code between different developers and under a thorough review. To make this possible and easy, it is not expected that the code is finalized, as was done in the specific cascade methods, but that the work is divided into small tasks, also called sprints, which do not involve a large effort or a great investment of time, so that these tasks can be reviewed. These reviews must be done at least once a day and are usually done at the end of each working day. Based on the results, you can continue creating or entering the modification phase, where once the error is detected, the group will decide how to overcome it and what should be modified.
Agile involves working quickly and trying to reduce the range of errors to the minimum possible. One way to achieve this is to promote teamwork, so that they help each other overcome obstacles and learn from each other.
Another feature is to break down large projects into small tasks, so that the work is much more bearable, lower pressure and more frequent delivery / validation times.
Therefore, a continuous flow of reviews, opinions, tests, feedback between the client and among the team members, overcoming errors, taking care of the code and working comfortably makes these types of practices so frequent today. It is now possible for a job to be more efficient and profitable.
Importance of continuous integration
Beck (1998) made a publication that emphasized the importance of fulfilling the objective of the development of modern applications, with multiple developers working simultaneously in different functions of the same application. However, if an organization merges the entire diversified source code into a single day (known as the “day of merger”), the resulting tasks can be tedious and manual, and can take a long time.
This happens because, when a developer works in a separate way to implement a change in an application, there is a possibility that this change may conflict with other changes implemented simultaneously by other developers. Continuous integration helps developers merge the changes they introduce into the code to incorporate them into a shared division (or branch) more frequently, even daily. Once the changes implemented by a developer in an application are merged, they are validated with the automatic development of the application and the execution of different levels of automated tests (generally, unit tests and integration) to verify that the changes have not damaged the application.
This means trying everything from classes and operation to the different modules that form the entire application. If an automatic test detects a conflict between the new and existing code, the CI facilitates the resolution of these errors frequently and quickly.
Continuous Integration System
For a system of continuous integration to be efficient, there are certain practices that we must carry out:
What is continuous delivery?
Continuous delivery (CD) takes the CI principle a step further according to Wallgren, A. (2016). It is the automated process of compilation and testing that extends to all application components, including configuration files, database schemas and environments. Each time changes are made to any of these components, the compilation and testing procedure is performed (ideally through automated channeling) so that the resulting compilation can be easily implemented. The resulting compilation does not always have to be published in production, but at least it must be implemented in an environment (such as staged organization) as close as possible to production. Therefore, product owners can be sure that any compilation that passes through this channel is released to the public.
Version control
The developer's job is the code. This code is shared and stored securely generally with the use of tools. We call this type of version control tool according to Typical CI process (Pepgotesting, 2019) because it not only stores the code securely and allows developers to share the code and collaborate together as a team in the Same code, but also code versions. This means that every time a developer adds some code, it does not replace the previous version, but adds a change in the history. That way, developers can mess up the code and can easily return to an earlier version. They can also investigate problems and understand what happened in the code by looking at the story.
GitFlow
GitFlow is a branching model according to Scot Chacon (2009). The GitFlow model is ideal for continuous integration. The idea is to ensure that every time a function branch merges to develop, continuous integration checks that everything is correct in this main branch.
This control is done regularly. Depending on the context of the project and the maturity of the equipment, this check can be performed only once a day or every time a developer makes a unique change.
Branches
Basically, what we are talking about is called branches in the version control terminology. One of these branches has a special meaning, it represents what is in production and what is the latest current version. All generated code is uploaded to one of the branches and is often called (but not always) the master branch to generate the deploy.
When developers create a new feature, they don't work directly in this branch, they create it in a different one where they interact.
Main Branches
The central repository has two main branches with an infinite life:
Support branches
Unlike the main branches, these branches always have a limited lifetime, since they will eventually be eliminated.
Merge
It is the term merge in the previous section to a single branch, usually the new branch is integrated into the master.
Advantages of continuous integration
Continuous integration provides several advantages or benefits in software development which are mentioned below:
In summary, the benefits of continuous integration consist of "solving problems quickly." Since the software is frequently integrated, when an error is found, it is typically not necessary to go back much to discover where the fault was introduced. In comparison, when a team does not follow a continuous integration strategy, the periods between integration are long and the code base is very different between each integration, so when errors are found, much more code needs to be reviewed, which requires more time and effort. In Fowler's (2009) words, "continuous integration does not eliminate defects, but it does make it much easier to find and correct them."
Disadvantages of continuous integration
Bibliography
Adanza, F. (2016), Implementing continuous delivery: Jenkins or Bamboo. Disponible en: https://www.getzephyr.com/insights/implementing-continuous-delivery-jenkins-or-bamboo(04 Junio 2017)
Apache Maven (2019). Disponible en https://maven.apache.org/guides/index.htm
Atlassian, (n.d.), Understanding the Bamboo CI Server, Disponible en: https://confluence.atlassian.com/bamboo/understanding-the-bamboo-ci-server289277285.html (04 Junio 2017)
Beck, K. (1998, March). Extreme programming: A humanistic discipline of software development. In International Conference on Fundamental Approaches to Software Engineering (pp. 1-6). Springer, Berlin, Heidelberg.
Carlos Blé Jurado(2016) Diseño Ágil con TDD.
Continuous Integration (2019). Disponible en: http://danielcoding.net/tag/continuous-integration/
Docker (2019). Disponible en https://docs.docker.com/
Fowler, M., Beck, K., Brant, and J. (2009) Refactoring: Improving the Design of Existing Code.
Gitlab (2019). Disponible en https://about.gitlab.com/product/continuous-integration/
GIT, GitFlow and Continuous Integration for Dummies (2019). Disponible en: https://jp-lambert.me/git-gitflow-and-continuous-integration-for-dummies-5e4300148fbf (20 Julio 2019)
Gómez-Luna, E., & Fernando-Navas, D., & Aponte-Mayor, G., & Betancourt-Buitrago. L. (2014). Metodología para la revisión bibliográfica y la gestión de información de temas científicos, a través de su estructuración y sistematización. Dyna, 81 (184), 158-163.
How To Orchestrate DevOps Tools Together To Solve Our Problems? (2019). Disponible en: https://www.edureka.co/blog/devops-tools/ (20 Julio 2019)
Jenkins 1.396 released, The first release of Jenkins is posted, Kohsuke Kawaguchi.
Jez Humble and David Farley (2011). Continuous Delivery. Disponible en
https://martinfowler.com/books/continuousDelivery.htm
Jgarzas (2014, 18 de octubre). Ph.D. en informática, Postdoctorate en la Carnegie Mellon (EE.UU) e Ingeniero en Informática.
Martin Fowler (2006, 1 de Mayo). Continuous Integration. Disponible en: https://martinfowler.com/articles/continuousIntegration.html
Nexus (2019). Disponible en: https://help.sonatype.com/integrations/nexus-and-continuous-integration
P. M. Duvall, S. Matyas, and A. Glover (2007) Continuous integration: improving software quality and reducing risk. Pearson Education.
Scot Chacon. Pro Git. (2009).
Sneha Kunja, S. (2017), What is Jenkins?. Disponible en:https://vmokshagroup.com/blog/what-is-jenkins/ (04 Junio 2017)
Sonarqube (2019). Disponible en: https://docs.sonarqube.org/latest
Stafford, J. (n.d.), Why automated continuous integration is a must for microservices success. Disponible en: http://searchmicroservices.techtarget.com/feature/Why-automated-continuousintegration-is-a-must-for-microservices-success (03 Junio 2017)
Typical CI process, (04 Junio 2019) Disponible: www.pepgotesting.com
Wallgren, A. (2016), Continuous Delivery and Release Automation for Microservices, Disponible en: http://electric-cloud.com/blog/2016/01/continuous-delivery-and-release-automation-formicroservices/ (03 Junio 2017)
No existe comentarios
{$ comment.comment $}