Some thoughts on continuous integration systems

10 June 2020

Over the last two years I had a few opportunities to play with 3 different CI systems: Gitlab Runner, Github Actions and DroneCI. This is by no means a review, just some thoughts I have gathered about these three systems... If you are not familiar with the concept of CI / CD, it means Continuous Integration and Continuous Deployment. So any changes made to the code in the repository are picked up by the CI system and automagically tested and deployed. This helps to see issues in the code before it is even merged into the production branches and also ensures simple and fast deployment. (image: runner.png imgclass: img-responsive)

Gitlab Runner

The first system I ever used for CI/CD was Gitlab runner. It is basically the number one system to use if you are you are using Gitlab in any flavor, weather it is the Gitlab cloud version or a self-hosted instance. Gitlab runner is written in GoLang and can also be used with some other Git online tools. I used Gitlab runner mainly for web app development, so testing was usually done in docker containers, deploying back-ends as well, and deploying front-ends by copying files to a web root. this can either be done using the ssh type of runner or the shell runner. Setting up the CI Is done by placing a .yml configuration file into the root of your repository and testing CI setups requires multiple pushes, till you get it right. The logs of the individual runs are shown in Gitlab's UI and stored for later analysis, which is very convenient. I really liked the simplicity of Gitlab runner, but using it for docker based things was always a kind of manual process... (image: actions.png imgclass: img-responsive)

Github Actions

Github has just recently (late 2019) started to provide it's own CI service. This one only works with Github of course, and in the beginning there was no separate runner one could install on eg a production server. This made deployment a little more complicated, but apparently by now Github as also published a runner built in .NET core1 , but I haven't tested that yet. The most awesome part of Github actions is that it can be used with Github's servers for free on open-source projects, making CI config as simple and fast as never before. Secrets can be added via the repository settings and the config is done, just as with the other systems, using a yml file in the root of the repo. Another awesome thing to mention is the possibility of hosted macOS machines, making it easier to automatically build and test macOS applications and even code-sign and notarize them, even though this is still slightly tricky to set up... (image: drone.png imgclass: img-responsive)

DroneCI

DroneCI is another open-source CI framework, that has become a lot more reliable as of version 1.0 . It is very focused on container based CI pipelines and runs as a docker container itself. The nice thing is that it can be integrated very tightly with several Source hosting platforms such as Gitlab, Github, Gitea, Gogs, Bitbucket and others. I personally use it with Gitea for my own git platform on (link: https://git.lbsfilm.at text: git.lbsfilm.at). By now it is also possible to use ssh and shell type of workers, but by now I really like the docker based pipelines for testing and other stuff, as it is really easy to build a custom docker image and prefill it with all of the needed tools to build and test the application. Of course the other systems can work in such a mode as well, but with Drone I am more in control of the source control server and can use it freely with different platforms. It is also simple to use drone with a private docker repository in case DockerHub is not suitable for you. But the most awesome feature of drone is its little CLI, that can execute a pipeline on your local docker installation. This really helps debugging the pipeline workflow much faster than having to push to a server and wait each time, and it saves you the 10-20 embarrassing commits that basically all say "Fixing CI build".

Conclusion

In my experience Drone has been my favorite of the three. It is also the only real option of the three as long as you do not want to use Github or Gitlab exclusively. Sure there are many, many other CI / CD systems out there, but drone seemed to be able to provide everything I needed. For small open-source projects though Github Actions lowered the threshold to using CI / CD massively, and it has only been introduced half a year ago, so I expect more and more users very quickly. I hope I could give you a little overview of the three systems, as always if you have any questions, feel free to (link: https://lbsfilm.at/about text: write me an email) :-)