Our company is constantly evolving. Innovative technologies and practices are being implemented that help us to improve and automate the software development process. Using advanced technologies such as Kotlin, Swift and React Native, our software engineers create quality mobile and web solutions.

However, in addition to development tools, there are a number of approaches to simplify project implementation. One is the use of continuous integration (CI) and continuous deployment (CD). We have recently applied this approach to the creation of Neurosonic, an IoT project for managing the company’s devices. You can learn about the launch of this IoT solution in our case study.

In this article we will explain how to apply continuous integration and continuous deployment to automate software development using Neurosonic as an example.

What was the problem

Neurosonic is an IoT project that allows users to connect to the company’s products – furniture – and manage them via Bluetooth.

Numerous micro-motors built into the mattress create vibrations that have a beneficial effect on the nervous system and normalize blood flow. The Neurosonic solution is designed to relax, fight insomnia and relieve joint, back and lower back pain.

Although it all started with a simple version of the mobile product, the system now integrates applications for corporate clients and partners and has a complex infrastructure. The peculiarity of this project is the presence of a large number of combinations of its assemblies.

This is both the version of the application and the brand for which the application is designed, as well as the inclusion and disabling of various parts of the functionality. Only in the presence of three versions of the application there are 288 different combinations of the final assembly, and this number will only grow.

As a result, at any request, the programmer must manually build a specific application and send it to the customer, which takes time.

Moreover, it is necessary to take into account that it is difficult to determine by the file name which combination is hidden in the given assembly, therefore it is necessary to carry out the account of versions and various parameters manually, and sometimes even to collect the application anew at all.

All this made us think about possible ways to automate the process of creating the application’s builds and sending them to the customer. And it was at this stage that we decided to implement the continuous integration and continuous deployment (CICD) approach.

What is Continuous Integration

Continuous integration is an approach to software creation which consists in performance of automated application assemblies for the fastest revealing of errors at any changes in a program code.

With CI, programmers often integrate their code – new or changed – into a common repository while avoiding bad code. Each part of the code is checked after it has been edited with an automatic build that allows them to find and correct errors instantly.

The use of continuous integration offers an opportunity to free the development team from many trivial tasks of building a project. Moreover, this practice leads to the absence of labor-intensive integration and chaos in the dates of product launch.

It also allows engineers to minimize debugging time and focus on creating the functionality of your software solution.

Continuous Deployment and its benefits

Continuous deployment is an extension for continuous integration that aims to automate the delivery of new changes to the customer. This solution provides the customer with the fastest possible feedback and frees the programmer from various tasks.

In a nutshell, continuous deployment works as follows: each change of code is automatically tested, which leads to the building of application builds. It is then introduced into the production stage through a variety of deployments. This approach allows mobile and web developers to create, test and deploy applications faster and more easily.

The fact is that the use of continuous deployment reduces the time it takes to complete tasks. As a result, we need less time to build better applications. The risk is lower as errors are quickly detected through frequent deployments.

It should be noted that you can collect and analyze user feedback for each new change or feature on the project. You can use A/B testing to understand your audience’s needs and see what they like and don’t like, and then use that knowledge to develop the perfect product.

How our developers implemented CICD

One of the main things you need to do before implementing CICD is to choose the server on which to implement the software product.

There are two possible ways – to purchase the necessary hardware and set up your own server or use a third-party server. So our task was to find out their pros and cons and decide which option would be better for us.

Own server

  • More control over processes
  • Difficulty of support
  • Difficulty of application deployment
  • Need to purchase additional equipment

Third party server

  • Availability of detailed documentation for integration
  • Technical support
  • Reliability, as the supplier has already checked the service
  • Rent

Based on the above arguments, it was decided to use a third-party server, namely CircleCI. An important factor that influenced our choice was the possibility to try the service free of charge and test the performance and ease of integration before starting work.

Programmers added a project to Bitbucket (this tool gives developers an opportunity to plan their projects, work together on writing code and test and deploy applications) in CircleCI.

The next step was to set up a .yml configuration file and specify some parameters and steps to be performed when a new commit appeared (download dependencies, build, save the build for further downloading).

Then we made it so that the API of this service could “knock and ask” to build a build and track its status. When this was done, the team added the necessary pages to the admin panel, used their requests and everything worked.

The user sets the parameters, then with these parameters there is a request for CircleCI and these parameters are specified as environment variables. The application finds these environment variables and the necessary build is formed in relation to them. After it is assembled, developers see the link and download the build in Google Drive and shove the link to it in the admin panel.

What’s going on? What’s going on?

After adding the project to the CircleCI system, configuration files were set up to automate the builds and all the necessary integration checks were performed.

Next we added a page with the possibility to choose the configuration and start building the application. After the administrator (customer) clicks on the “Collect” button, a new entry appears on another similar page, where we can observe the current status of the task of building the application.

If successful, we will see a link to the necessary file that can be downloaded. In case of failure, the developer will be immediately informed and will be able to start correcting the error as soon as possible.

In conclusion…

As you can see, continuous deployment + continuous integration is a great practice in mobile and web development that allows programmers to create, test and deploy their applications faster.

Importantly, you save time and budget with automation. What’s more, you get a better product. We’re going to use the CICD approach in all our projects to accelerate the software development process and deliver new changes to customers.

We hope you found this article useful. If you have any questions or project ideas, please contact us. Having a great experience in solving customers’ problems, we will be glad to help you!