Why You Should Set Up CI/CD Before Writing Features

Why You Should Set Up CI/CD Before Writing Features

Is there a Problem?

Most developers and teams delay setting up Continuous Integration and Continuous Deployment (CI/CD) until after they have built a set of core features. This is often because they prioritize getting a working prototype first, underestimating the complexity of deployment issues that may arise later. While this seems logical at first, it often leads to deployment issues surfacing too late in the development cycle, causing delays and frustration. Instead, I follow a different approach: I set up the deployment pipeline immediately after creating the project’s boilerplate—before building any features.

This article explores why setting up CI/CD early is more efficient. It provides real-world examples and supporting evidence, demonstrating how this approach leads to faster and smoother software development.


Common Approaches to CI/CD Setup

What Most Developers Do What I Do
1 Build core features first Set up project boilerplate
2 Set up CI/CD after several iterations Set up GitHub Actions CI/CD pipeline next
3 Hit deployment issues later Verify production deployment early
4 Debug CI/CD under pressure Start feature development with a working pipeline

Most developers assume CI/CD is something they can handle later—once the product is further along. But this often leads to wasted time, as they hit unexpected deployment issues when they’re finally ready to launch. My approach prevents this by ensuring that everything is production-ready from the start.


Why Setting Up CI/CD Early is Better

1. Avoids Last-Minute Deployment Issues

Many teams spend weeks or months developing features only to realize deployment is broken when they finally try to push to production. CI/CD introduces:

  • Automated builds and tests to catch issues early.
  • A clear, repeatable deployment process that ensures no surprises.

Supporting Evidence:
A report by Google’s DORA (DevOps Research and Assessment) team (2021) found that elite teams who deploy frequently have 208x more frequent deployments and 106x faster lead times than low-performing teams. You can read the full report here. found that elite teams who deploy frequently have 208x more frequent deployments and 106x faster lead times than low-performing teams (DORA Report, 2021). By setting up CI/CD early, you immediately establish a streamlined deployment process rather than scrambling to set it up later.

2. Prevents the "It Works Locally" Problem

If you wait until later to set up CI/CD, there’s a high chance your code will work on your local machine but fail in a production-like environment. Early CI/CD ensures:

  • Your infrastructure is correctly configured from Day 1.
  • Deployment works across different machines and environments.

Example:
In 2014, Knight Capital Group lost $440 million in 45 minutes due to a failed deployment that was not properly tested (Bloomberg). Setting up CI/CD early mitigates such risks by enforcing a structured deployment pipeline.

3. Speeds Up Feature Development

When CI/CD is in place from the start:

  • Every feature you build is always deployable.
  • You get immediate feedback on what breaks the build.
  • Developers spend less time fixing deployment issues and more time building features.

Supporting Evidence:
A study by Puppet found that teams practicing Continuous Delivery recover from failures 168x faster than teams that don’t. This is largely due to automated testing, fast feedback loops, and a robust deployment pipeline that allows for quick rollbacks and fixes. (State of DevOps Report). This means developers waste less time troubleshooting deployment failures.

4. Encourages a Production-First Mindset

When you start with CI/CD, you think about:

  • How your application will run in production from the beginning.
  • Automating processes to ensure consistent deployments.
  • Security, performance, and scalability before problems arise.

This aligns with the best practices of Trunk-Based Development, where code is always in a deployable state (Google Engineering Practices).


How to Implement This Approach

Here’s a simple roadmap to set up CI/CD before writing features. Whether you are a solo developer or part of a large team, following this structured approach ensures a smooth transition from development to production.:

1️⃣ Create the Boilerplate Project

  • Set up the basic folder structure, frameworks, and dependencies.

2️⃣ Implement a Simple CI/CD Workflow (Example: GitHub Actions)

  • Create a basic pipeline that builds and deploys an empty app.
name: Deploy Boilerplate
on: push
jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Code
        uses: actions/checkout@v4
      - name: Deploy Placeholder App
        run: echo "Deploying the initial setup!"

3️⃣ Deploy the Boilerplate to Production

  • Verify that CI/CD can deploy successfully.
  • Debug infrastructure or permissions issues before adding complexity.

4️⃣ Start Feature Development

  • Now that deployment is confirmed, build features confidently.

Conclusion: CI/CD First, Features Second

While many developers wait until they have built out their product to implement CI/CD, setting it up first is a much smarter approach. It ensures faster iteration, smoother deployments, and fewer surprises when launching new features.

By prioritizing deployment readiness from Day 1, you establish a production-first mindset that eliminates technical debt and enables rapid scaling. If you’re serious about shipping software efficiently, try implementing CI/CD early—and see how much faster your development workflow becomes.

What’s Your CI/CD Approach?

Do you set up deployment pipelines early, or do you wait until after feature development? Share your experiences and challenges with CI/CD in the comments below! Let me know in the comments!


Disclaimer: The views and opinions expressed on this website are solely those of the author and do not necessarily reflect the official policy or position of any employer or organization affiliated with the author.