Setup of a CI environment, automated tests and delivery pipeline for a manufacturer of special-purpose-vehicles
Client
Industry: Vehicle Manufacturing
Revenue: €5 Million
Employees: 30
Location: Europe
Project
Setup of continuous integration and delivery for software designed to process and render embedded data of connected vehicles.
Objectives
Automate the build, qualification, and delivery onto a cloud-hosted machine
Ability to run several builds per day and deploy a stable version or hotfix in five mouse clicks
Measure the quality of the software and detect deteriorations and regressions
Keep the history of all analyses done in the past
Challenges
Very low budget
No dedicated team or human resources
Different environments and databases supported
Solution
I set up a continuous-integration and delivery environment on Jenkins using pipelines.
With a small set of reusable pipelines, different builds for different contexts could run with very low maintenance.
The builds were either manual, scheduled, or kicked off by commits on Git or other builds.
The full deployment process is a configurable build to select the environment and kind of build to deploy.
Jenkins uses a master machine and several lightweight agents in the cloud for scalability and control of costs.
Once a night, a full build with coverage and analysis with SonarQube runs to provide impartial quality statuses.
Tests run to volatile third-parties Docker containers to check all the environments and databases with no need for system administration for each specific one.
More specifically, I used the following:
Jenkins for the build and tests automation
SonarQube for the static-code analysis
Maven to configure the building and testing
JUnit and Clover for the test coverage
Cargo plugin for Maven to test the deployment on several systems (Tomcat, Jetty, JBoss)
Docker to test on different database systems (MySQL, PostgreSQL, Oracle XE)
Gatling for the integration tests of the API
Results
The maintenance cost was very low. The system only required a few updates to reflect major changes in the software. Thus, the changes in the Jenkins pipeline became part of the development process, which made the programming consistent at any time with building and deploying, whatever the branch.
The monthly invoice for the cloud-hosting was less than €70.
Technical debt was specifically checked to stay below 2%, and critical or major technical issues were fixed before going into production, only a couple of hours after the developers coded the related features.
Technologies Supported
Jenkins for the build and tests automation
SonarQube for the static code analysis
Maven to configure the building and testing
JUnit and Clover for the test coverage
Cargo plugin of Maven to test the deployment on several systems (Tomcat, Jetty, JBoss)
Docker to test onto different database systems (MySQL, PostgreSQL, Oracle XE)
Gatling for the integration tests of the API
Key Success Factors
Experience with continuous-integration/-delivery patterns and Jenkins in particular:
Clear and repeatable workflow
Build scripts stored in the code repository, next to the application code
Reusable pipeline scripts in Jenkins to decrease the side effects of changes