XXIX Betabeers Granada: Continuous integration

Chema Oct. 26, 2018

jenkins betabeers unit test testing ci docker

Antonio Ramos (Axesor International) told us what continuous integration is, why it is important to implement it in IT companies and how to start with it without dying while trying. We tell you all the details.

Why Continuos Integration?

Ramón (@commiteatv) began the talk by making us see why continuous integration is important. 

Among the multitude of advantages stands out the saving of time in putting a new version in production.

Not only it is worth that the times are reduced, but also minimum requirements of quality are fulfilled. 

And this is where the fundamental pillar of continuous integration comes: the tests.

There are many types of tests. The most important are the unit tests.

They are a type of test called black box, because they focus on the input and output parameters without knowing how programming is done.

In fact, he commented on a development methodology that became fashionable in the past: Test-Driven Development (TDD).

Very summarized, in tdd before writing a line of code, the first thing is to design and write the unit tests. Then the tests are passed while the functionality is implemented. 

Ramón believes that a TDD methodology where, once the functionality is implemented, the code is refactorized, it will put the TDD development back on top.

There are other types of tests called white box: coverage test

These tests or meta-tests, they seek to see what percentage of your code is covered by the unit tests.

To pass from a testing version to production one, you can set a threshold percentage of coverage. This in the end is a way to measure the quality of the tests and the code in general.

Where to start?

There are many tools to perform continuous integration. Most are open source.

There are even SaaS that allow you to do everything from the cloud (CicleCI, Travis CI, etc).

Jenkins is the best known open source alternative. It is written in Java and thanks to its ecosystem of plug-ins you can use it with (almost) any language and technology.

You can download it from its website or use it with docker (which is highly recommended).

As Ramón says, its UI seems to be from the 90s (Redesign with Material guys?).

Jenkins runs in master-agent mode. Agents can handle requests for general or specific compilations for each language. Agents are usually run in their own container.

The main screen of jenkins shows the current projects as well as information about when it was executed, whether the unit tests passed or not, etc.

You have to configure Jenkins and the repository so that when you do a push, the compilation and testing process starts.

Picture of the audience

Utilities for everything

As mentioned before, Jenkins has a multitude of plugins.

Ramón highlighted several important ones and he focused on and explained SonarQube.

This software creates a report about possible bugs, very complex codes and vulnerabilities. It is very useful for detecting repeated check conditions (example: same condition of nested "ifs" inside the block), files that do not close, etc.

Thanks!

May we probably miss a thing of the talk. Thankfully, the talk is recorded and the presentation shared.

Firstly, we want to thank Antonio Ramón (@commiteatv) for the great talk.
It was curious that there were no questions, but a collective request: a practical workshop. So we put ourselves into it.

The talk would not have been possible without the collaboration of erranT, Digitalilusion and Civica.

Picture of projection when the collaboratos logos are on

Thank you very much to everyone and see you in the next one!

Media

Slides:  Meetup-CI.pptx.pdf

Video

Do not miss anything!

Subscribe to our mailing list and stay informed

Accept the terms & privacy conditions

Subscription done! Thanks so much

This website uses cookies

The cookies on this website are used to personalize content and analyze traffic. In addition, we share information about your use of the website with web analytics partners, who may combine it with other information you have provided or collected from your use of their services. You accept our cookies if you continue to use our website.
 

I agree See cookies

This website uses cookies

The cookies on this website are used to personalize content and analyze traffic. In addition, we share information about your use of the website with web analytics partners, who may combine it with other information you have provided or collected from your use of their services. You accept our cookies if you continue to use our website.