Share to: share facebook share twitter share wa share telegram print page

Continuous integration

Sketch of flow diagram for continuous integration

Continuous integration (CI) is the practice of integrating source code changes frequently and ensuring that the integrated codebase is in a workable state.

Typically, developers merge changes to an integration branch, and an automated system builds and tests the software system.[1] Often, the automated process runs on each commit or runs on a schedule such as once a day.

Grady Booch first proposed the term CI in 1991,[2] although he did not advocate integrating multiple times a day, but later, CI came to include that aspect.[3]

History

The earliest known work (1989) on continuous integration was the Infuse environment developed by G. E. Kaiser, D. E. Perry, and W. M. Schell.[4]

In 1994, Grady Booch used the phrase continuous integration in Object-Oriented Analysis and Design with Applications (2nd edition)[5] to explain how, when developing using micro processes, "internal releases represent a sort of continuous integration of the system, and exist to force closure of the micro process".

In 1997, Kent Beck and Ron Jeffries invented extreme programming (XP) while on the Chrysler Comprehensive Compensation System project, including continuous integration.[1][self-published source] Beck published about continuous integration in 1998, emphasising the importance of face-to-face communication over technological support.[6] In 1999, Beck elaborated more in his first full book on Extreme Programming.[7] CruiseControl, one of the first open-source CI tools,[8][self-published source] was released in 2001.

In 2010, Timothy Fitz published an article detailing how IMVU's engineering team had built and been using the first practical CI system. While his post was originally met with skepticism, it quickly caught on and found widespread adoption[9] as part of the lean software development methodology, also based on IMVU.

Practices

The core activities of CI are developers co-locate code changes in a shared, integration area frequently and that the resulting integrated codebase is verified for correctness. The first part generally involves merging changes to a common version control branch. The second part generally involves automated processes including: building, testing and many other processes.

Typically, a server builds from the integration area frequently; i.e. after each commit or periodically like once a day. The server may perform quality control checks such as running unit tests[10] and collect software quality metrics via processes such as static analysis and performance testing.

This section lists best practices from practitioners for other practices that enhance CI.

Build automation

Build automation is a best practice.[11][12]

Atomic commits

CI requires the version control system to support atomic commits; i.e., all of a developer's changes are handled as a single commit.

Committing changes

When making a code change, a developer creates a branch that is a copy of the current codebase. As other changes are committed to the repository, this copy diverges from the latest version.

The longer development continues on a branch without merging to the integration branch, the greater the risk of multiple integration conflicts[13] and failures when the developer branch is eventually merged back. When developers submit code to the repository they must first update their code to reflect the changes in the repository since they took their copy. The more changes the repository contains, the more work developers must do before submitting their own changes.

Eventually, the repository may become so different from the developers' baselines that they enter what is sometimes referred to as "merge hell", or "integration hell",[14] where the time it takes to integrate exceeds the time it took to make their original changes.[15]

Testing locally

Proponents of CI suggest that developers should use test-driven development and to ensure that all unit tests pass locally before committing to the integration branch so that one developer's work does not break another developer's copy.

Incomplete features can be disabled before committing, using feature toggles.

Continuous delivery and continuous deployment

Continuous delivery ensures the software checked in on an integration branch is always in a state that can be deployed to users, and continuous deployment automates the deployment process.

Continuous delivery and continuous deployment are often performed in conjunction with CI and together form a CI/CD pipeline.

Version control

Proponents of CI recommend storing all files and information needed for building in version control, (for git a repository); that the system should be buildable from a fresh checkout and not require additional dependencies.

Martin Fowler recommends that all developers commit to the same integration branch.[16]

Automate the build

Build automation tools automate building.

Proponents of CI recommend that a single command should have the capability of building the system.

Automation often includes automating the integration, which often includes deployment into a production-like environment. In many cases, the build script not only compiles binaries but also generates documentation, website pages, statistics and distribution media (such as Debian DEB, Red Hat RPM or Windows MSI files).

Commit frequently

Developers can reduce the effort of resolving conflicting changes by synchronizing changes with each other frequently; at least daily. Checking in a week's worth of work risks conflict both in likelihood of occurrence and complexity to resolve. Relatively small conflicts are significantly easier to resolve than larger ones. Integrating (committing) changes at least once a day is considered good practice, and more often better.[17]

Daily build

Building daily, if not more often, is generally recommended.[citation needed]

Every commit should be built

The system should build commits to the current working version to verify that they integrate correctly. A common practice is to use Automated Continuous Integration, although this may be done manually. Automated Continuous Integration employs a continuous integration server or daemon to monitor the revision control system for changes, then automatically run the build process.

Every bug-fix commit should come with a test case

When fixing a bug, it is a good practice to push a test case that reproduces the bug. This avoids the fix to be reverted, and the bug to reappear, which is known as a regression.

Keep the build fast

The build needs to complete rapidly so that if there is a problem with integration, it is quickly identified.

Test in a clone of the production environment

Having a test environment can lead to failures in tested systems when they deploy in the production environment because the production environment may differ from the test environment in a significant way. However, building a replica of a production environment is cost-prohibitive. Instead, the test environment or a separate pre-production environment ("staging") should be built to be a scalable version of the production environment to alleviate costs while maintaining technology stack composition and nuances. Within these test environments, service virtualisation is commonly used to obtain on-demand access to dependencies (e.g., APIs, third-party applications, services, mainframes, etc.) that are beyond the team's control, still evolving, or too complex to configure in a virtual test lab.

Make it easy to get the latest deliverables

Making builds readily available to stakeholders and testers can reduce the amount of rework necessary when rebuilding a feature that doesn't meet requirements. Additionally, early testing reduces the chances that defects survive until deployment. Finding errors earlier can reduce the amount of work necessary to resolve them.

All programmers should start the day by updating the project from the repository. That way, they will all stay up to date.

Everyone can see the results of the latest build

It should be easy to find out whether the build breaks and, if so, who made the relevant change and what that change was.

Automate deployment

Most CI systems allow the running of scripts after a build finishes. In most situations, it is possible to write a script to deploy the application to a live test server that everyone can look at. A further advance in this way of thinking is continuous deployment, which calls for the software to be deployed directly into production, often with additional automation to prevent defects or regressions.[18][19]

Benefits

CI benefits include:

  • Facilitates detecting bugs earlier
  • Reduces effort to find cause of bugs; if a CI test fails then changes since last good build contain causing change; if build after each change then exactly one change is the cause[1]
  • Avoids the chaos of integrating many changes
  • When a test fails or a bug is found, reverting the codebase to a good state results in fewer lost changes
  • Frequent availability of a known-good build for testing, demo, and release
  • Frequent code commit encourages modular, less complex code[20]
  • Quick feedback on system-wide impact of code changes
  • Supports collection of software metrics such as code coverage, code complexity

Risks

Risks of CI include:

  • Build system setup requires effort[21]
  • Writing and maintaining an automated test suite requires effort
  • Value added depends on the quality of tests[22]
  • High build latency (sitting in queue) limits value[22]
  • Implies that incomplete code should not be integrated which is counter to some developer's preferred practice[22]
  • Safety and mission-critical development assurance (e.g., DO-178C, ISO 26262) require documentation and review which may be difficult to achieve

See also

References

  1. ^ a b c Fowler, Martin (1 May 2006). "Continuous Integration". Retrieved 9 January 2014.
  2. ^ Booch, Grady (1991). Object Oriented Design: With Applications. Benjamin Cummings. p. 209. ISBN 9780805300918. Retrieved 18 August 2014.
  3. ^ Beck, K. (1999). "Embracing change with extreme programming". Computer. 32 (10): 70–77. doi:10.1109/2.796139. ISSN 0018-9162.
  4. ^ Kaiser, G. E.; Perry, D. E.; Schell, W. M. (1989). Infuse: fusing integration test management with change management. Proceedings of the Thirteenth Annual International Computer Software & Applications Conference. Orlando, Florida. pp. 552–558. CiteSeerX 10.1.1.101.3770. doi:10.1109/CMPSAC.1989.65147.
  5. ^ Booch, Grady (December 1998). Object-Oriented Analysis and Design with applications (PDF) (2nd ed.). Archived from the original (PDF) on 19 August 2019. Retrieved 2 December 2014.
  6. ^ Beck, Kent (28 March 1998). "Extreme Programming: A Humanistic Discipline of Software Development". Fundamental Approaches to Software Engineering: First International Conference. Vol. 1. Lisbon, Portugal: Springer. p. 4. ISBN 9783540643036.
  7. ^ Beck, Kent (1999). Extreme Programming Explained. Addison-Wesley Professional. p. 97. ISBN 978-0-201-61641-5.
  8. ^ "A Brief History of DevOps, Part III: Automated Testing and Continuous Integration". CircleCI. 1 February 2018. Retrieved 19 May 2018.
  9. ^ Sane, Parth (2021), "A Brief Survey of Current Software Engineering Practices in Continuous Integration and Automated Accessibility Testing", 2021 Sixth International Conference on Wireless Communications, Signal Processing and Networking (WiSPNET), pp. 130–134, arXiv:2103.00097, doi:10.1109/WiSPNET51692.2021.9419464, ISBN 978-1-6654-4086-8, S2CID 232076320
  10. ^ Radigan, Dan. "Continuous integration". Atlassian Agile Coach.
  11. ^ Brauneis, David (1 January 2010). "[OSLC] Possible new Working Group – Automation". open-services.net Community (Mailing list). Archived from the original on 1 September 2018. Retrieved 16 February 2010.
  12. ^ Taylor, Bradley. "Rails Deployment and Automation with ShadowPuppet and Capistrano". Rails machine (blog). Archived from the original on 2 December 2012. Retrieved 16 February 2010.
  13. ^ Duvall, Paul M. (2007). Continuous Integration. Improving Software Quality and Reducing Risk. Addison-Wesley. ISBN 978-0-321-33638-5.
  14. ^ Cunningham, Ward (5 August 2009). "Integration Hell". WikiWikiWeb. Retrieved 19 September 2009.
  15. ^ "What is Continuous Integration?". Amazon Web Services.
  16. ^ Fowler, Martin. "Practices". Continuous Integration (article). Retrieved 29 November 2015.
  17. ^ Paul M. Duvall; Steve Matyas; Andrew Glover (2007). Continuous Integration: Improving Software Quality and Reducing Risk. Addison-Wesley Professional. ISBN 978-0-321-33638-5.
  18. ^ Ries, Eric (30 March 2009). "Continuous deployment in 5 easy steps". Radar. O’Reilly. Retrieved 10 January 2013.
  19. ^ Fitz, Timothy (10 February 2009). "Continuous Deployment at IMVU: Doing the impossible fifty times a day". Wordpress. Retrieved 10 January 2013.
  20. ^ Junpeng, Jiang; Zhu, Can; Zhang, Xiaofang (July 2020). "An Empirical Study on the Impact of Code Contributor on Code Smell" (PDF). International Journal of Performability Engineering. 16 (7): 1067–1077. doi:10.23940/ijpe.20.07.p9.10671077. S2CID 222588815.
  21. ^ Laukkanen, Eero (2016). "Problems, causes and solutions when adopting continuous delivery—A systematic literature review". Information and Software Technology. 82: 55–79. doi:10.1016/j.infsof.2016.10.001.
  22. ^ a b c Debbiche, Adam. "Assessing challenges of continuous integration in the context of software requirements breakdown: a case study" (PDF).

Read other articles:

LGBT rights in TransnistriaLocation of Transnistria (green)in Europe (dark grey)  –  [Legend]StatusLegal since 2002Gender identity-Military-Discrimination protectionsNoneFamily rightsRecognition of relationshipsNoneAdoption- Lesbian, gay, bisexuals, and transgender (LGBT) persons in Transnistria face legal challenges not experienced by non-LGBT residents. The Pridnestrovian Moldavian Republic (PMR) is an unrecognised breakaway state with its own judicial sys...

KFC

Kentucky Fried Chicken (KFC)Logo KFC sejak 2018JenisAnak perusahaanIndustriRestoranGenreRestoran cepat sajiDidirikanSanders Court & Café:20 Maret 1930; 93 tahun lalu (1930-03-20)North Corbin, KentuckyWarabala pertama:24 September 1952; 71 tahun lalu (1952-09-24)Salt Lake City, UtahPendiriHarland SandersPete HarmanKantorpusat1441 Gardiner LaneLouisville, Kentucky, U.S.Dallas, Texas, U.S. (Dunia)Cabang24,104[1][2] (2015)TokohkunciTony Lowings CEO[3] a...

Argentine footballer (born 1993) Luciano Vietto Vietto in 2017Personal informationFull name Luciano Darío Vietto[1]Date of birth (1993-12-05) 5 December 1993 (age 29)[1]Place of birth Balnearia, ArgentinaHeight 1.74 m (5 ft 9 in)[1]Position(s) Forward, wingerTeam informationCurrent team Al-QadsiahNumber 28Youth career2000–2008 Independiente Balnearia2008–2010 Estudiantes2010–2011 Racing ClubSenior career*Years Team Apps (Gls)2011–2014 Racin...

Tsjochataoeriჩოხატაურის მუნიციპალიტეტი Gemeente in Georgië Locatie in Georgië Geografie Regio Goeria Hoofdplaats Tsjochataoeri Oppervlakte 825.1 km² [1] Hoogste punt Mepistskaro (2850 m) Coördinaten 42° 1′ NB, 42° 15′ OL Bevolking Inwoners (2023) 17.322 [2] (21 inw./km²) Etniciteit (2014) Georgisch (99,7%) Religie (2014) Georgisch-Orthodox (86,1%)Islam (12,8%) Bestuur Burgemeester Davit Sjarasjidze (2021-) Over...

Cet article est une ébauche concernant les relations internationales, la France et la Roumanie. Vous pouvez partager vos connaissances en l’améliorant (comment ?) selon les recommandations des projets correspondants. Relations entre la France et la Roumanie France Roumanie Ambassades Ambassade de France en Roumanie   Ambassadeur Michèle Ramis   Adresse Strada Biserica Amzei 13-15Bucarest   Site web ambafrance-ro.org Ambassade de Roumanie en France  ...

Cet article recense les monuments à la Seconde Guerre mondiale en Macédoine du Nord. Liste Monument Lieu Artiste Date Coordonnées Photo Monument aux combattants tombés Belčišta Jordan Grabuloski 1958 Monument aux combattants tombés Belčišta Cimetière des Partisans de Bitola Bitola Monument à la Révolution Bitolj Monument aux combattants tombés Brvenica Monument aux combattants tombés Debar Monument aux combattants tombés Delčevo Monument à la Liberté Gevgelija Jordan Grabulo...

Bloque sólido combustible incinerándose para producir puzolana artificial. Ogatan, Los aglomerados del carbón de leña que los japoneses hicieron usando aserrín. Las briquetas o bloque sólido combustible son biocombustibles para generar calor utilizados en estufas, chimeneas, salamandras, hornos y calderas. Es un producto 100 % ecológico y renovable, catalogado como bioenergía sólida, que viene en forma cilíndrica o de ladrillo y sustituye a la leña con muchas ventajas. El tér...

1972 single by Bee GeesAliveSingle by Bee Geesfrom the album To Whom It May Concern B-sidePaper Mache, Cabbages And KingsReleased10 November 1972Recorded21 October 1971 IBC Studios, LondonGenreSoft rock, symphonic, popLength4:03LabelPolydor, Philips (elsewhere) Atco (US/CA)Songwriter(s)Barry Gibb, Maurice GibbProducer(s)Robert Stigwood, Barry Gibb, Robin Gibb, Maurice GibbBee Gees singles chronology Run To Me (1972) Alive (1972) Saw a New Morning (1973) Audio samplefilehelp Alive is a ballad ...

Arondisemen Caen Administrasi Negara Prancis Region Basse-Normandie Departemen Calvados Kanton 24 Komune 288 Préfecture Caen Statistik Luas¹ 1,990 km² Populasi  - 1999 389,973  - Kepadatan 196/km² Lokasi Lokasi Caen di Basse-Normandie ¹ Data Pendaftaran Tanah Prancis, tak termasuk danau, kolam, dan gletser lebih besar dari 1 km² (0.386 mi² atau 247 ekar) juga muara sungai. Arondisemen Caen merupakan sebuah arondisemen di Prancis, terletak di département Calvados, di ...

رجل من العصور الوسطى شَعره طويل. امرأة شَعرُها طويل. الشعر الطويل هي تصفيفة شعر يسمح فيها للشعر بالنمو إلى طول معين. ويُمكِن أن يتغيّر ما نعتبره شعر طويل من ثقافةٍ إلى أُخرى أو حتّى داخِل الثقافات، فعلى سبيل المثال المرأة التي يكون شعرها بطول الذقن يُمكِن أن يُقالَ في بعض الأ

Francisco BrinesBiographieNaissance 22 janvier 1932OlivaDécès 20 mai 2021 (à 89 ans)GandiaSépulture Cimetière général de Valence (d)Nationalité espagnoleFormation Université de ValenceActivités Poète, écrivainAutres informationsA travaillé pour Université d'OxfordUniversité de CambridgeMembre de Académie royale espagnoleMouvement Génération de 50Genre artistique PoésieDistinctions Prix Cervantes (2020)Liste détailléePrix Adonáis de poésie (1960)Prix de littérature...

Augusto B. LeguíaLeguía di sebuah acara balap kuda. (1924)Presiden Peru ke-65Masa jabatan24 September 1908 – 24 September 1912PendahuluJosé PardoPenggantiGuillermo BillinghurstPresiden Peru ke-69Masa jabatan4 Juli 1919 – 25 Agustus 1930PendahuluJosé PardoPenggantiManuel Ponce Informasi pribadiLahir(1863-02-19)19 Februari 1863Lambayeque, PeruMeninggal7 Februari 1932(1932-02-07) (umur 68)Callao, PeruPartai politikPartai Sipil,Partai Reformis DemokratSuami/istriJul...

Dieser Artikel behandelt den Ort Linköping; für die schwedische Gemeinde Linköping siehe Linköping (Gemeinde). Linköping Linköping Staat: Schweden Schweden Provinz (län): Östergötlands län Historische Provinz (landskap): Östergötland Gemeinde (kommun): Linköping Koordinaten: 58° 24′ N, 15° 38′ O58.40833333333315.625Koordinaten: 58° 24′ N, 15° 38′ O SCB-Code: 1152 Status: Tätort Einwohner: 106.502 (31. D...

Season of television series The FlashSeason 8Promotional poster for the eighth seasonStarring Grant Gustin Candice Patton Danielle Panabaker Danielle Nicolet Kayla Compton Brandon McKnight Jesse L. Martin Country of originUnited StatesNo. of episodes20ReleaseOriginal networkThe CWOriginal releaseNovember 16, 2021 (2021-11-16) –June 29, 2022 (2022-06-29)Season chronology← PreviousSeason 7Next →Season 9List of episodes The eighth season of the American superhero t...

Japanese baseball player (born 1994) Ohtani redirects here. For other people with the surname, see Ōtani. The native form of this personal name is Ōtani Shōhei. This article uses Western name order when mentioning individuals. Baseball player Shohei OhtaniOhtani with the Los Angeles Angels in 2022Free agent Pitcher / Designated hitterBorn: (1994-07-05) July 5, 1994 (age 29)Ōshū, Iwate, JapanBats: LeftThrows: RightProfessional debutNPB: March 29, 2013, for the Hokk...

Schiltern (Dorf)OrtschaftKatastralgemeinde Schiltern Schiltern (Gemeinde Langenlois) (Österreich) Basisdaten Pol. Bezirk, Bundesland Krems-Land (KR), Niederösterreich Pol. Gemeinde Langenlois Koordinaten 48° 30′ 59″ N, 15° 37′ 33″ O48.5164415.62588380Koordinaten: 48° 30′ 59″ N, 15° 37′ 33″ Of1 Höhe 380 m ü. A. Einwohner der Ortschaft 620 (1. Jän. 2023) Fläche d.&#...

Jean de ClermontBiographieNaissance PoitiersDécès 19 septembre 1356PoitiersActivité MilitairePère Raoul IV de Clermont, Seigneur d'Erblencourt (d)Mère Jeanne de Chambly, Dame d'Erblencourt (d)Conjoint Marguerite de Mortagne, Vicomtesse d'Aunay (d)Enfant Jean II de Clermont, Vicomte d'Aunay, Seigneur de Mortagne (d)Autres informationsGrade militaire Maréchal de FranceConflit Guerre de Cent AnsDistinction Maréchal de Francemodifier - modifier le code - modifier Wikidata Jean de...

2020 space opera novel by Linden A. Lewis The First Sister AuthorLinden LewisLanguageEnglishSeriesThe First Sister TrilogyGenreScience fiction; space operaSet inOuter space; CeresPublisherSkybound EntertainmentPublication date4 Aug 2020Pages352 (Hardcover)ISBN9781982126995Followed byThe Second Rebel  The First Sister is a 2020 space opera novel, the debut novel by Linden A. Lewis. It centers on conflict between the Icarii and the Geans, inhabitants of Mercury and Venus as well ...

В Википедии есть статьи о других людях с фамилией Колотовкин. Вячеслав Геннадьевич Колотовкин Личная информация Пол Мужской Страна  Россия Клуб Динамо, Ultimatum Дата рождения 20 января 1970(1970-01-20) (53 года) Место рождения с. Савватеево, Нерчинский район, Читинская область, РСФ...

1886 aftermath of a bombing in Chicago, US Several terms redirect here. For other uses, see 2007 London car bombs and Haymarket Riot (band). Haymarket affairPart of the Great UpheavalThis 1886 engraving was the most widely reproduced image of the Haymarket massacre. It shows Methodist pastor Samuel Fielden speaking, the bomb exploding, and the riot beginning simultaneously; in reality, Fielden had finished speaking before the explosion.[1]DateMay 4, 1886LocationChicago, Illino...

Kembali kehalaman sebelumnya