CI/CD pipeline comparison – Jenkins vs. GitHub Actions

I’ve been asked recently whether I would use Jenkins or GitHub Actions to create a CI pipeline for a web app project. This got me thinking a bit, as it’s a comparison I’ve often thought about but never had to make a decision on.

I’m fully aware of the multitudes of caveats and “it depends” of such a vague premise. There are also multiple other hosted services as well as open source projects to choose from, such as GitLab CI, Circle CI, Azure DevOps, to name a few. There are also stack-specific tools to choose from, such as Netlify, Vercel, or the various tools in the Kubernetes space. It’s unrealistic for me to do a comprehensive comparison, or experience them all.

I just want to note down some thoughts after having some experience using these two systems. YMMV.

Jenkins

If you work in an “enterprise”, or a big team with a variety of different tech stacks, it might be worthwhile to invest the time and effort into maintaining your own Jenkins server, or look into a hosted offering.

It’s a tried and true option, with tons of resources and support, and is infinitely extensible. The new style of Declarative Pipeline has made reading and maintaining Jenkins pipeline more enjoyable, while the ability to embed Groovy script into your pipeline makes it very flexible.

Another benefit is a fairly complex permissions and security model, with support for RBAC and secrets management.

GitHub Actions

While Jenkins has been around forever, GA is the shiny new toy. Its biggest advantage is perhaps its beautiful UI integrated directly into where your code lives. It takes away the burden of maintaining a separate system to test and build your code.

This might be a bit controversial, but I am not too fond of the yaml syntax chosen. While it’s very popular in certain circles, I find it limiting when you want to do some highly customized logic, which I’ve found to be pretty common in a build pipeline.

Similar to Jenkins extensible plugin model, GA also allows you to reuse code, which is pretty cool and powerful. Sometimes trying to incorporate these shared actions can feel a bit awkward.

What to choose

As I started to write down some of these thoughts, I realized that there are just too many factors to consider here. I could write several posts discussing each of these topics in details. But that might not be too useful for anyone.

My general opinion is, if you’re already using GitHub, then spend a couple days building out GitHub Actions workflow. If you can get it to work and do everything you need, consider it a win! I think it will require the least amount of maintenance going forward, and thus will be a higher return on investment.

If you find yourself struggling with it too much, then don’t be afraid to spin up a Jenkins server. There’s a pretty good chance you’ll be able to get it to do exactly what you need.

If you have other thoughts and opinions, feel free to reach out and have a conversation. I spend a good amount of my time building pipelines, and am always looking to learn more.

comments powered by Disqus