Say you have a production line making cars in a factory.
Which would you prefer – the machine that makes a part well enough to get the job done while requiring little to no maintenance, or the machine that makes a perfect part every time, but needs way more tender loving care?
This is the exact trade-off between CircleCI and Jenkins – work smarter, not harder.
The production line metaphor is actually not a bad one when describing why CircleCI is the best framework for the fundamentals of a DevOps workflow. The goal here is to implement small changes and check in lines of code for the purposes of version control quite frequently. The end result is that you have a practice that helps the dev team to integrate and validate code changes without much disruption to functionality. Better yet, the delivery system can be automated by coordinating what changes need to be made to web servers, databases, user interfaces, and any other moving parts so the updated application can deploy as it’s meant to.
Continuous Integration or CI ensures that each individual part is made properly, will pass quality assurance tests, and is assembled correctly – whereas Continuous Delivery or CD ensures that the assembled car itself is efficient.
In coding, CI is focused on how well the code is written and how its tested before being merged into the final build, and CD is concerned with making sure the master build as a whole is functional in a real-world application.
The key is to have your CI and CD implemented so successfully that the handover between the two is a flawless process that takes the click of a button to complete. Continuous delivery requires a manual step or button press to commence, whereas Continuous Deployment describes the process of automated building, testing and deploying done automatically with no manual intervention whatsoever.
What Is CircleCI:
Once upon a time, Jenkins was the go-to tool for DevOps automation, and worked quite well in an environment of quickly evolving technologies. It was, and still is, a popular open-source tool for continuous integration and delivery.
Sneakily, it’s actually a fork of Oracle Hudson with an incorporated plugin system that includes third party extensions so additional tools and functionality can be added. The upside is that Jenkins grants the user with a creative licence to experiment and explore new ideas with unique functionality in mind, but on the other hand, it’s a case of given enough rope – you’ll hang yourself.
Added functionality comes with its own set of challenges. Configuration and maintenance get exponentially harder as the code becomes more complex. Just getting plugins to work and repairing problems encountered in the user experience often takes up more time that working in Jenkins itself – taking programming resources away from the actual project.
CircleCI is a case of same-same, but different. It’s been around for about a decade, and was developed with hindsight as a design brief – essentially looking at what Jenkins did well and using that, and what Jenkins fails abysmally at and not doing that. Pretty simple stuff. Not only that, it draws upon nearly every CI/CD toolkit that predates it – cherry picking all the good ideas.
Instead of adding in third party extensions via a plugin system, CircleCI just builds them right into the core coding to clean up the process and improve the user experience to make it less janky and buggy.
It goes one further by sporting integrated communications that can easily talk to other third-party services like GitHub, AWS, GCP and Kubernetes. The main advantage however is that instead of setting aside resources to get your own particular flavour of in-house Jenkins to work as it should with the plugins, CircleCI has sharable orbs – which are pretty much packages of a certain type of CircleCI configuration. Odds are that someone, somewhere, has tried to do exactly what you want to do and has a cheat sheet for it – so to speak.
What Is CircleCI Used For?
Gotta keep feeding that CI/CD pipeline. Software development isn’t really about developing software anymore – as counterintuitive as that sounds. This is a new age, and there is so much more that code can do than just be code – it can take over the way code is integrated and deployed. Think of it like the movie Inception, except this actually makes sense and there are no spinning tops.
Continuous deployment is now accepted in the mainstream. Say you have a team of devs, with each member working on a specific feature of the application. It makes sense to integrate each facet of the app as the bugs are ironed out and new builds are generated – instead of trying to mash them all in at the end and ending up with a cluster fork of clashing code.
CircleCi does just that. Integration and delivery is automated for deployment, drastically reducing the amount of Sherlock Holmes level detective work you have to do when backtracked to find the root cause of the issue. Time is money, and this saves on a truck load of time.
The way CircleCI works is actually pretty straightforward. The developers pluck a section of code to work on from the common repository associated with the application and work on it locally – pretty much creating a new branch with any changes they make.
When this new fork of code is ready to be re-introduced back into the collective, it’s tested locally in the development environment it’s been built in. If everything is all good and it passes, the new code is then transferred over where the change is reflected on the server, where the application is re-built and tested as a whole.
After the entire system is compiled and all tests are complete, the server spits out an outcome depending on how the new code checked out – failed build, successful build, failed tests, or successful tests.
If the build has passed with flying colours, the base code is updated to incorporate the changes. If not, the team has the chance to work on that particular section of code again – making another branch iteration in the hopes that it tests OK and is merged into the main branch.
CircleCI automates this whole process whenever the devs want to introduce new code into the application. It’s nearly impossible to introduce bad code that has failed tests into the main branch. It has the flexibility to operate as a continuous delivery system but ensures that every build that tests good is ready for release with the click of a button, or function as a continuous deployment system by automatically releasing every good build to the production environment. You get to choose the level of automation you want.
On the Cloud:
CircleCI is a cloud-based system, so there is no server to administrate if you don’t want to – however there is an option to run it in a private data centre. Dedicated servers are a thing of the past.
It’s super easy to get your application off to a flying start by using CircleCI, as it’s extremely fast when compared to other CI/CD toolkits. Just add the YAML file into the repository root, chuck some tasks inside it, and get to work.
Remember the factory reference? An easily readable YAML configuration and relatively lightweight construction is that machine that doesn’t really need all that much attention for it to do its job properly. Also, it’s text based – which is awesome.
Other CI/CD tools only allow up to 20 members of a dev team working on the code at the one time. CircleCI can do over 10 times that, running hundreds of tasks concurrently while handling them at various stages of testing, building, and deployment – a seriously powerful and complex workflow that does the heavy lifting for you.
No Mucking About:
As we’ve already touched on, the CircleCI application user interface already has that access to other third-party features. A free plan is available for even a business level account, and there are complete ready-made solutions to suit your needs that require almost no configuration or adjustment – like we said, more often than not someone has been in your shoes before and has a sharable CircleCI orb to make it all work as it should.
Although CircleCI can talk to a variety of programming languages, it only really runs Golang, Haskell, Java, PHP, Python, Ruby and Scala out of the box. Anything else will need the appropriate CircleCI orb installed.
So, setting up CircleCi is easy, but at the same time, it’s not instantly obvious. The documentation on how to get going leaves a lot to be desired.
Although the user interface is way cleaner than Jenkins, that doesn’t mean CircleCi is inherently good either. With such a high number of applications enabled, it can be hard to find the particular build or orb you’re looking to use.
Who’s Using CircleCI:
Pretty much every major company has built an application using CircleCI at some point in their recent history. Some notable mentions include GoPro, Facebook, Spotify, Udemy, Kickstarter, Lyft, Delivery Hero… the list goes on.
While CircleCI is a great tool, Jenkins isn’t its only competitor, and some of the competition are pretty big names you may already be familiar with.
#1 Jenkins – we just spent a whole blog discussing these two so obviously Jenkins is its top competitor.
#2 GitHub – Users say it’s easier to setup, better at support, and is easier to admin comparatively.
#3 CloudBees CodeShip – supporters claim its much simpler than Jenkins or CircleCI and it’s free to get started which is always a plus.
#4 BitRise- Another plug- and- play option with many plugins offered.
#5 GitLab – Is great at creating and managing repositories and is also packed with good activity-monitoring features
Overall is it Jenkins or CircleCI?
The CI/CD system you choose really depends on what you’re doing, and the way you’re doing it. CircleCI is the go-to at the moment for small to medium projects, as it’s the simpler and more lightweight of the two.
However, Jenkins does still have a place in large projects thanks to the flexibility to incorporate third party plugins as you please, and fully customise your own version to suit your needs – you can literally change anything and everything, but at the cost of speed and time.
Which one you pick depends on your project and personal preference, either can get the job done.
We hope this article helped you learn more about CircleCI and why you should give it a try!
If you enjoyed this article you may also enjoy 5 Reasons Why D3js is the Best Framework for Visualization or What Is NoSQL: The 4 Databases Explained.
Kofi Group offers a multitude of resources to help you learn more, improve your career, and help startups hire the best talent. If you are interested in learning more get in touch today!