How we use Continuous Deployment and Сontinuous Integration for software development automation
Our company is constantly developing. We are looking for and integrating innovative tools and approaches that help us improve and automate our software development process. Using advanced technologies like Kotlin, Swift, and React Native, our software engineers deliver modern mobile and web solutions faster and of a higher quality.
However, there are other successful things that facilitate the app/system creation. One of them is the use of continuous deployment (CD) and continuous integration (CI). Recently, we have used this practice for making Neurosonic, an IoT project for managing the company’s devices. You can find out more about building this technological solution in our case study.
In this post, we’ll tell you about the implementation of CICD for accelerating software engineering on the example of Neurosonic.
What was the problem
Neurosonic is an IoT-based project that allows customers to connect to and manage Neurosonic products—furniture items—via Bluetooth.
Multiple micromotors are embedded into the mattress and call vibrations having a positive effect on human nerves and blood flow. The use of this solution helps relax, relieve pain in joints, and fight against insomnia.
Although everything was beginning from a simple mobile product version, now the system involves applications for corporate customers 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 includes the app version, the brand for which this app is designed for, as well as switching on and switching out various parts of the functionality. Moreover, we have already created three mobile app versions and now there are 288 different combinations of the final assembly, and this number will be increasing.
As a result, a software engineer must manually make a specific product assembly at any request and send it to the customer, which is time-consuming and inefficient.
Our team also understood that it is difficult to determine by the file name which combination is implied in a certain assembly. So, we didn’t want to have to manually keep track of the app versions and various parameters or even worse—re-assemble the application.
These challenges made us think about possible ways to automate the process of building application assemblies and sending them to the client. And to solve them, we decided to use CICD—continuous integration and continuous deployment.
What is Continuous Integration
Continuous integration is an approach to software development that enables engineers to accelerate application assemblies for detecting errors as soon as possible and with any changes in the code.
CI encourages dev teams to frequently integrate their code—either new or modified—into a shared repository while avoiding bad code. Each check-in is verified by an automated build which allows them to instantly find and fix errors.
The use of continuous integration offers the ability to release programmers from many trivial tasks of assembling a project. Moreover, this practice results in lack of last-minute chaos at product launch dates and time-consuming integrations. In addition, it enables engineers to minimize the time for debugging and focus more on building the functionality of your software solution.
What is Continuous Deployment
Continuous deployment is an extension for Continuous integration that helps dev teams speed up the delivery of new changes to the client. This solution contributes to the fastest customer feedback and also frees a programmer from a number of tasks.
Simply put, CD works as follows: each code change passes automated tests which leads to assembling app builds. Then it is put into production stage through plenty of production deploys. This approach allows software engineering teams to build, test, and deploy good applications faster and easier.
The point is that due to the use of continuous deployment, a lead time becomes reduced. As a consequence, we need less time to deliver more quality apps. Risks are also lower as errors are quickly found thanks to frequent deploys.
It is noteworthy that you can collect and analyze user feedback for each new change or feature implemented in your project. You can take advantage of A/B testing to get insight into your audience’s needs and see what they like and what don’t and then use this knowledge for creating the product they will love.
How our software engineers implemented CICD
One of the main things to do before the implementation of CICD is to choose the server on which a software product will be built. There are two possible ways—purchase the required equipment and set up your own server or use a third-party server. Therefore, our task was to investigate the pros and cons and decide which option will suit our needs.
➕ Having more control over the processes
➖ Difficult to support
➖ Difficult to deploy applications
➖ The need to purchase additional equipment
➕ Availability of detailed integration documentation
➕ Technical support
➕ Reliability as service providers have checked everything
➖ Rental fee
Based on these arguments, we decided to use a third-party server. Our software development team chose CircleCI as it complied with our technical requirements. An important factor that affected our choice was the opportunity to try this service for free and test the performance and ease of integration before we start working with it.
Software developers added the project on Bitbucket (this tool provides programmers with the place to plan their projects, collaborate on writing code, and test and deploy applications as well) to CircleCI.
The next thing was to set up a .yml configuration file to specify some parameters and steps to perform when a new commit appears (download the dependencies, assemble the build, save the build for future downloading).
Following that, we made the API of this service so that our backend could “knock and ask” to compile the build and track its state. Once this was done, the team added the necessary pages to the admin panel, used queries, and we got everything working.
The user sets the parameters, then with these parameters there comes a request for a CircleCI and they are specified as the environment variables. The app finds these environment variables and the build is formed according to them. After it is assembled, we see the link, download it to Google Drive, and send the link to the administrator panel.
Having CIDI implementation ready
After adding the project to the CircleCI system, our developers set up configuration files to automate assemblies and performed all the necessary integration checks. Hereafter, we added a page with the possibility to choose the configuration and launch the app assembly. After the administrator (customer) clicks on the “Collect” button, a new entry appears on another similar page, where we can see the current status of the application assembly task.
If successful, there appears a link to the needed file that can be downloaded. In case of failure, engineers will be immediately informed and will be able to fix this error as soon as possible.
As you can see, continuous deployment + continuous integration is a great software development practice that allows dev teams to build, test, and deploy their applications faster.
What’s important, you save your time and budget due to the automation. But even more, you get a more quality product. Now we are going to use the CICD approach in all of our projects to accelerate software engineering and the delivery of new changes to customers.
Hope, the article has been useful for you. If you have questions about the topic or have a project idea, feel free to contact a trustworthy web and mobile development company! Having high experience in solving the clients’ tasks and challenges, we’ll be glad to help you!