Search

Plainly Explained: CI/CD & CircleCI

Updated: Apr 10

Let's talk about CI/CD and CircleCI. CI/CD is Continuous Integration / Continuous Delivery or Continuous Deployment, depending on what you're talking about. Let's focus on Continuous Integration / Continuous Delivery for this article. What are they? Well, CI/CD is an approach or a method and CircleCI is a tool.


To deliver some piece of value in software, CI/CD is a way to reduce time-to-value and increase the confidence of releasability and stability. For example, consider one of your high-use mobile applications (maybe it's Facebook or Instagram...) and how often it changes.


Have you ever had one of those weeks where every time you look at your mobile applications, there seems to be an update every day? Or every few days? Or maybe multiple times per day? That's Continuous Delivery. One or more teams are constantly working on improving the software in some way. Working backwards, that brings us to Continuous Integration.


Continuous Integration is the practice of contributing and repairing quickly, where necessary. Here's a basic flow:

  1. A developer creates and commits code early and often.

  2. The committed code triggers a CI/CD Pipeline to run.

  3. If the CI/CD Pipeline fails, the developer repairs it.

There's a catch with the above process in longstanding enterprises with certain processes such as ITIL and Change Management practices, but that's a story for another time. In this case, as a friend once said - "Don't dig your heels in". Don't undo your change. Fail forward. Identify the problem and resolve it, where possible.


That's CI/CD, Plainly Explained:


  • Continuous Integration - Commit code, run a pipeline, fix it if it fails

  • Continuous Delivery - Automate and reduce the amount of time required to get new versions of software to consumers



So let's cover CircleCI. Someone can create some sequence of events triggered by something, which is commonly defined as a Pipeline. Relatively speaking, I can liken CI/CD to "all vehicles" where CircleCI is a truck. I can choose which vehicle I want to operate. Essentially, CircleCI is one of many CI/CD Pipeline tools. Competitors and similar tools include Jenkins, Azure DevOps Pipelines, and Atlasssian Bamboo to name a few. More on those some other time. Let's focus on an overview of CircleCI.


CircleCI is a CI/CD Pipeline tool which is used to accelerate delivery. Check out CircleCI for more information on their product offerings. CircleCI allows for developers and teams to create a set of instructions that can run independently, sequentially, and/or conditionally. For a detailed introduction to CircleCI configurations, check this out. As for Plainly Explained, here is how I like to look at it...


Just tell me what's required and I'll get fancy with it later.


  1. What are the prerequisites?

  2. I need a GitHub Repository so that the CircleCI config has a home and, ideally, content to do some work with.

  3. Alright, I have a GitHub Repository. Now what?

  4. I need to authorize CircleCI and apply the proper permissions so that GitHub and CircleCI can work together to automate more work faster. More on that in a future episode.

  5. Ok, all set. Next. Let's talk about the content in the config file.

  6. One of the easiest starting points is to start with only that which I need. I can get started with Version, Workflows, Jobs, and Steps. Every concept in CircleCI has a definition and detailed information can be found here, but i look at this slightly differently so that i can grasp it easier.

  7. version = declared version of CircleCI

  8. Workflows = orchestrator of Jobs

  9. Jobs = collection of steps

  10. Steps = Some tasks to be ran

Here's a good example, as found in CircleCI documentation:

The above illustration works well for many people, but I tend to learn better by association, analogies, and visualizations. So I think of these configuration files with layers. And when I think of layers, I think of pizza.




Each Step has a home in a Job. Each Job has a home in the Workflow. Each Job can have similar, identical, or different Steps. Each Workflow can have similar, identical, or different Jobs.


That's CircleCI, Plainly Explained:


  1. It's a tool to automate, reduce time to deployment, and hopefully make lives easier.

  2. CircleCI documentation can be leveraged to reduce onboarding time...

  3. Or it can be experimented with and thought of in creative ways... like pizza!


You can start with sample configurations to help identify what type of configuration works best for you. Happy automating!


0 comments

Recent Posts

See All