Nerdsense

Build, Test, Deploy: The CI/CD Adventure (with a Dash of Argo CD Magic)

Greg Heffner July 3, 2025
CI/CD pipeline illustration

Software doesn’t just happen—it’s built, tested, and launched with care and automation. That’s where CI/CD comes in: your invisible backstage crew ensuring every deployment goes off without a hitch. In this post, I’ll demystify Continuous Integration and Continuous Deployment, walk through some workflow examples I rely on (like cache-clearing and auto-tagging), and show how Argo CD helps me keep Kubernetes updates hands-free and hassle-free.

Continuous Integration (CI)

CI is the practice of automatically building and testing your application whenever changes are made. This ensures code is always in a deployable state. For example, when you push code to your GitHub repository, a CI tool like GitHub Actions can automatically:

  • Lint your code to catch syntax errors
  • Compile your application to ensure it builds correctly
  • Run unit tests to verify functionality
  • Deploy to a staging environment for further testing

I use GitHub Actions for CI, which allows me to define workflows in YAML files. These workflows can be triggered by events like code pushes, pull requests, or even on a schedule. Here are some key workflows I've implemented:

Example Workflows

  1. Clear Cloudflare Cache: Manually triggers a job to purge your Cloudflare cache and update a status badge in your repo.
    Why it matters: Ensures visitors see the latest deployed content after changes. Reduces stale artifact issues in browser caches. Keeps your README reflective of your current deployment state.
  2. Delete Kubernetes Pods: Deletes specific or all pods in a namespace — ideal for resetting test environments on demand.
    Why it fits CI: Maintains clean state between test runs. Prevents flaky tests caused by resource leakage or stale app state. Can be tied to pre/post test hooks for reproducible environments.
  3. Monthly Build and Retag: Automates Docker image builds and retags them on a schedule (or manually), updates deployment manifests, and refreshes documentation badges.
    Why it’s valuable: Ensures fresh builds without relying on user-triggered commits. Reduces image drift between code and deployment config. Enforces repeatability and traceability — cornerstones of robust CI.

Continuous Deployment (CD)

Argo CD logo and workflow

CD takes CI a step further by automatically deploying your application to production after passing tests. I use a tool called Argo CD, which is a Continuous Delivery (CD) tool designed for Kubernetes. It works by connecting to your GitHub repository and automatically deploying changes to your Kubernetes cluster whenever you update your manifests in the repo.

Argo CD follows the GitOps model, where your Git repository is the single source of truth for your application state. This means you can manage your Kubernetes deployments declaratively, using YAML files stored in Git.

Example workflow:

  1. You update a deployment YAML in your GitHub repo.
  2. Argo CD detects the change.
  3. Argo CD applies the new configuration to your Kubernetes cluster.
  4. Your app is updated automatically, and the deployment status is visible in Argo CD.

My Argo CD Deployments

Here are the actual deployment configurations I use in my home lab setup:

Summary by Copilot

Imagine building a LEGO spaceship with your friends—every time someone adds a new piece, a robot checks to make sure it still flies (that’s called CI).

If the ship passes all the tests, another robot sends it off to space automatically (that’s CD).

Greg uses smart helpers like GitHub Actions to keep the ship clean and strong, and Argo CD to launch it without anyone pressing buttons.

It’s like having a team of tireless robot builders and launchers making sure your ship is always ready for liftoff!

About Me

I served in the U.S. Army, specializing in Network Switching Systems and was attached to a Patriot Missile System Battalion. After my deployment and Honorable discharge, I went to college in Jacksonville, FL for Computer Science. I have two beautiful and very intelligent daughters. I have more than 20 years professional IT experience. This page is made to learn and have fun. If its messed up, let me know. Im still learning :)

Weather Loop

Southeast US weather radar loop