One of my favorite tools for managing embedded DevOps is Gitlab. Embedded software teams across the globe are starting to recognize that software process modernization is critical to keeping software quality high, doing more with fewer resources, and keeping up with the competition. In order to do so, DevOps tools are necessary. In this post, we will explore Gitlab, one of many tools available to help embedded teams manage their DevOps.
(Note: I have zero relationships with the company. This is just a tool I use and that I have found helpful to me and my clients.)
The Value of Tools like Gitlab
When it comes to tools, we sometimes get hung up on tool costs and forget to look at the return on investment (ROI) that a tool provides to our development teams. It’s important to be frugal, but if spending money can make money, and more importantly a profit on that investment, then we are hurting ourselves by not spending money. Depending on the size of the team, Gitlab can range from being free to be nearly $100 per user at the high-end with all the bells and whistles.
I view the value of the platform as an integrated DevOps platform, the one-stop-shop to manage a project. I can store project code in a Git repo, manage issues with the software, and most importantly, set up a CI/CD pipeline to manage my builds and deployments. Overall, tools like Gitlab can provide value in the form of:
- Improving software quality
- Decreasing the time spent debugging
- Decreasing overall project costs
- Enhancing the ability to meet deadlines
- Simplifying the software deployment process
These are just a few points of value let alone potential improvements to team collaboration.
Gitlab’s CI/CD Pipelines
One of the features that I really like about Gitlab is how easy it is to set up CI/CD pipelines. As part of my 2021 Embedded System Best Practices live streams, I walked my attendees through Gitlab and how to set up Docker to build for STM32. Part of the process was how to set up a pipeline.
For embedded developers, we can set up several different jobs within a pipeline quite easily. For example, below is an example Gitlab CI/CD pipeline:
The pipeline that is developed is controlled by a yml file. The yml file describes in a script-like format what is in the pipeline. As you can guess, my yml file describes a three-stage pipeline: build, test, and deploy. In total, there are four jobs that are completed throughout the pipeline: build, lint, unit test, and deploy. The above pipeline is, in my opinion, the minimum full pipeline that embedded developers should use. I think the Deploy pipeline is potentially optional if the team does not want to automatically deploy their firmware.
Other Useful Gitlab Features
Gitlab also has some other useful and interesting features. First, Gitlab can be integrated with Slack. When a teammate commits their code, the Slackbot can be notified and provide information about the commit like who did it, what the comments are, and the branch. Next, the paid-for features allow a team to manage repo permissions on several levels. For example, management can provide read-only access while developers can have read/write.
Another interesting feature is the issues. Developers can list specific issues in the software for tracking. They can create boards to manage various software features, activities, and tasks. Software milestones can also be developed to help developers run some basic, Agile methodologies for development.
Overall, I think Gitlab provides embedded developers looking to get started with DevOps an interesting solution. Individual developers can use it for free, which gives some options to get to know the tool without having to spend any money. There’s a whole lot more than the tool can do than I’ve mentioned, but I mainly view the tool through the lens of an embedded developer. The CI/CD capabilities I think are impressive and intuitive. The trick is to identify the DevOps tool that best fits your team, get it up and running, and start integrating its processes into your workflow.