DEVOPS: PHASES OF CONTINUOUS INTEGRATION

Continuous Integration is not an all-or-nothing affair. In fact, introducing CI into an organization takes us on a path that progresses through several distinct phases. Each of these phases involves incremental improvements to the technical infrastructure as well as, perhaps more importantly, improvements in the practices and culture of the development team itself. The following sections paint an approximate picture of each phase.

Phase 1 - No Build Server

Initially, the team has no central build server of any kind. Software is built manually on a developer's machine, though it may use an Ant script or similar to do so. Source code may be stored in a central source code repository, but developers do not necessarily commit their changes on a regular basis. Some time before a release is scheduled, a developer manually integrates the changes, a process which is generally associated with pain and suffering.

Phase 2 - Nightly Builds

In this phase, the team has a build server, and automated builds are scheduled on a regular (typically nightly) basis. This build simply compiles the code, as there are no reliable or repeatable unit tests. Indeed, automated tests, if they are written, are not a mandatory part of the build process, and may well not run correctly at all. However developers now commit their changes regularly, at least at the end of every day. If a developer commits code changes that conflict with another developer's work, the build server alerts the team via email the following morning. Nevertheless, the team still tends to use the build server for information purposes only-they feel little obligation to fix a broken build immediately, and builds may stay broken on the build server for some time.

Phase 3 - Nightly Builds and Basic Automated Tests

The team is now starting to take Continuous Integration and automated testing more seriously. The build server is configured to kick off a build whenever new code is committed to the version control system, and team members are able to easily see what changes in the source code triggered a particular build, and what issues these changes address. In addition, the build script compiles the application and runs a set of automated unit and/or integration tests. In addition to email, the build server also alerts team members of integration issues using more proactive channels such as Instant Messaging. Broken builds are now generally fixed quickly.

Phase 4 - Enter the Metrics

Automated code quality and code coverage metrics are now run to help evaluate the quality of the code base and (to some extent, at least) the relevance and effectiveness of the tests. The code quality build also automatically generates API documentation for the application. All this helps teams keep the quality of the code base high, alerting team members if good testing practices are slipping. The team has also set up a "build radiator," a dashboard view of the project status that is displayed on a prominent screen visible to all team members.

Phase 5 - Getting More Serious About Testing

The benefits of Continuous Integration are closely related to solid testing practices. Now, practices like Test-Driven Development are more widely practiced, resulting in a growing confidence in the results of the automated builds. The application is no longer simply compiled and tested, but if the tests pass, it is automatically deployed to an application server for more comprehensive end-to-end tests and performance tests.

Phase 6 - Automated Acceptance Tests and More Automated Deployment

Acceptance-Test Driven Development is practiced, guiding development efforts and providing high-level reporting on the state of project. These automated tests use Behavior-Driven Development and Acceptance-Test Driven Development tools to act as communication and documentation tools and documentation as mush as testing tools, publishing reports on test results in business terms that non-developers can understand. Since these high-level tests are automated at an early stage in the development process, they also provide a clear idea of what features have been implemented, and which remain to be done. The application is automatically deployed into test environments for testing by the QA team either as changes are committed, or on a nightly basis; a version can be deployed(or "prompted") to UAT and possibly production environments using a manually-triggered build when testers consider it ready. The team is also capable of using the build server to back out a release, rolling back to a previous release, if something goes horribly wrong.

Phase 7 - Continuous Deployment

Confidence in the automated unit, integration and acceptance tests is now such that teams can apply the automated deployment techniques developed in the previous phase to push out new changes directly into production. The progression between levels here is of course somewhat approximate, and may not always match real-world situations. For example, we may well introduce automated web tests before integrating code quality and code coverage reporting. However, it should give a general idea of how implementing a Continuous Integration strategy in a real world organization generally works.

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末苏揣,一起剝皮案震驚了整個濱河市改览,隨后出現(xiàn)的幾起案子续语,更是在濱河造成了極大的恐慌,老刑警劉巖,帶你破解...
    沈念sama閱讀 221,430評論 6 515
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件凤类,死亡現(xiàn)場離奇詭異檬果,居然都是意外死亡,警方通過查閱死者的電腦和手機(jī)坊秸,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 94,406評論 3 398
  • 文/潘曉璐 我一進(jìn)店門麸祷,熙熙樓的掌柜王于貴愁眉苦臉地迎上來,“玉大人褒搔,你說我怎么就攤上這事阶牍。” “怎么了星瘾?”我有些...
    開封第一講書人閱讀 167,834評論 0 360
  • 文/不壞的土叔 我叫張陵走孽,是天一觀的道長。 經(jīng)常有香客問我琳状,道長磕瓷,這世上最難降的妖魔是什么? 我笑而不...
    開封第一講書人閱讀 59,543評論 1 296
  • 正文 為了忘掉前任念逞,我火速辦了婚禮困食,結(jié)果婚禮上,老公的妹妹穿的比我還像新娘翎承。我一直安慰自己硕盹,他們只是感情好,可當(dāng)我...
    茶點故事閱讀 68,547評論 6 397
  • 文/花漫 我一把揭開白布叨咖。 她就那樣靜靜地躺著莱睁,像睡著了一般待讳。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發(fā)上仰剿,一...
    開封第一講書人閱讀 52,196評論 1 308
  • 那天创淡,我揣著相機(jī)與錄音,去河邊找鬼南吮。 笑死琳彩,一個胖子當(dāng)著我的面吹牛,可吹牛的內(nèi)容都是我干的部凑。 我是一名探鬼主播露乏,決...
    沈念sama閱讀 40,776評論 3 421
  • 文/蒼蘭香墨 我猛地睜開眼,長吁一口氣:“原來是場噩夢啊……” “哼涂邀!你這毒婦竟也來了瘟仿?” 一聲冷哼從身側(cè)響起,我...
    開封第一講書人閱讀 39,671評論 0 276
  • 序言:老撾萬榮一對情侶失蹤比勉,失蹤者是張志新(化名)和其女友劉穎劳较,沒想到半個月后,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體浩聋,經(jīng)...
    沈念sama閱讀 46,221評論 1 320
  • 正文 獨居荒郊野嶺守林人離奇死亡观蜗,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點故事閱讀 38,303評論 3 340
  • 正文 我和宋清朗相戀三年,在試婚紗的時候發(fā)現(xiàn)自己被綠了衣洁。 大學(xué)時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片墓捻。...
    茶點故事閱讀 40,444評論 1 352
  • 序言:一個原本活蹦亂跳的男人離奇死亡,死狀恐怖坊夫,靈堂內(nèi)的尸體忽然破棺而出砖第,到底是詐尸還是另有隱情,我是刑警寧澤环凿,帶...
    沈念sama閱讀 36,134評論 5 350
  • 正文 年R本政府宣布梧兼,位于F島的核電站,受9級特大地震影響拷邢,放射性物質(zhì)發(fā)生泄漏。R本人自食惡果不足惜屎慢,卻給世界環(huán)境...
    茶點故事閱讀 41,810評論 3 333
  • 文/蒙蒙 一瞭稼、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧腻惠,春花似錦环肘、人聲如沸。這莊子的主人今日做“春日...
    開封第一講書人閱讀 32,285評論 0 24
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽复哆。三九已至,卻和暖如春腌零,著一層夾襖步出監(jiān)牢的瞬間梯找,已是汗流浹背。 一陣腳步聲響...
    開封第一講書人閱讀 33,399評論 1 272
  • 我被黑心中介騙來泰國打工益涧, 沒想到剛下飛機(jī)就差點兒被人妖公主榨干…… 1. 我叫王不留锈锤,地道東北人。 一個月前我還...
    沈念sama閱讀 48,837評論 3 376
  • 正文 我出身青樓闲询,卻偏偏與公主長得像久免,于是被迫代替她去往敵國和親。 傳聞我的和親對象是個殘疾皇子扭弧,可洞房花燭夜當(dāng)晚...
    茶點故事閱讀 45,455評論 2 359

推薦閱讀更多精彩內(nèi)容

  • 這幾天來隱隱約約感覺周圍有什么事情冥冥中在發(fā)生著變化。有這種體驗真的很讓人興奮泊愧。 自從水坑與輝英姑姑一別伊磺,接下來發(fā)...
    燕紀(jì)事閱讀 325評論 1 0
  • 人成年以后,朋友和以前有什么不同删咱?小時候屑埋,所謂朋友就是能夠陪你一起玩的人,一個人如果無法再陪你玩了痰滋,那么ta就不能...
    淡藍(lán)的尾巴閱讀 263評論 0 0
  • 童年的陰影源于兩位老太太摘能,一位是與今天話題無關(guān)的龍婆羅蘭,說起來前兩天看了鄭嘉穎和謝安琪的新劇《僵》中被龍婆嚇得每...
    怡乙閱讀 1,904評論 0 0