- Learning DevOps
- Mikael Krief
- 535字
- 2021-06-24 12:32:00
Implementing CI
To set up CI, it is, therefore, necessary to have a Source Code Manager (SCM) that will allow the centralization of the code of all members. This code manager can be of any type: Git, SVN, or Team Foundation Source Control (TFVC). It's also important to have an automatic build manager (CI server) that supports continuous integration such as Jenkins, GitLab CI, TeamCity, Azure Pipelines, GitHub Actions, Travis CI, Circle CI, and so on.
Each team member will work on the application code daily, iteratively and incrementally (such as in agile and scrum methods). Each task or feature must be partitioned from other developments with the use of branches.
Regularly, even several times a day, members archive or commit their code and preferably with small commits (trunks) that can easily be fixed in the event of an error. This will, therefore, be integrated into the rest of the code of the application with all of the other commits of the other members.
This integration of all the commits is the starting point of the CI process.
This process, executed by the CI server, must be automated and triggered at each commit. The server will retrieve the code and then do the following:
- Build the application package—compilation, file transformation, and so on.
- Perform unit tests (with code coverage).
This CI process must be optimized as soon as possible so that it can run fast and developers can have quick feedback on the integration of their code. For example, code that is archived and does not compile or whose test execution fails can impact and block the entire team.
Sometimes, bad practices can result in the failure of tests in the CI, deactivating the test execution, taking as arguments: it is not serious, it is necessary to deliver quickly, or the code that compiles it is essential.
On the contrary, this practice can have serious consequences when the errors detected by the tests are revealed in production. The time saved during CI will be lost on fixing errors with hotfixes and redeploying them quickly with stress. This is the opposite of DevOps culture with poor application quality for end users and no real feedback, and, instead of developing new features, we spend time correcting errors.
With an optimized and complete CI process, the developer can quickly fix their problem and improve their code or discuss it with the rest of the team and commit their code for a new integration:

This diagram shows the cyclical steps of continuous integration that include the code being pushed into the SCM by the team members and the execution of the build and test by the CI server. And the purpose of this fast process is to provide rapid feedback to members.
We have just seen what continuous integration is, so now let's look at continuous delivery practices.
- 急性卒中機(jī)械取栓:現(xiàn)狀與經(jīng)驗(yàn)
- 癲癇患者經(jīng)濟(jì)負(fù)擔(dān)藍(lán)皮書
- 人體寄生蟲學(xué)(第2版)
- 眼科手術(shù)器械清洗消毒滅菌技術(shù)操作規(guī)程
- 臨床神經(jīng)遺傳病學(xué)
- 國(guó)家兒童腫瘤監(jiān)測(cè)年報(bào)(2022)
- 臨床神經(jīng)認(rèn)知及社會(huì)功能評(píng)估手冊(cè)
- 血液病臨床診療精要
- 人感染禽流感防治知識(shí)問(wèn)答
- 預(yù)防老年人跌倒健康教育教程(工作人員用書)
- Mastering Blockchain Programming with Solidity
- 結(jié)核病診斷與防治技術(shù)
- 非婦科脫落細(xì)胞學(xué)
- Hands-On Reactive Programming with Clojure
- 老年疾病預(yù)防與康復(fù)保健