A build farm running 36,000 jobs a month for 120 engineers costs about 1,165 dollars on self-hosted Spot instances, against 2,304 dollars on hosted runners. Here is the breakdown and where the crossover actually sits.
Preview environments are worth paying for, but most teams have never calculated the per pull request price. The number depends far more on lifespan and shared infrastructure than on the workload itself. Here is the arithmetic and the levers that move it.
Managed CI minutes are simple and priced per minute. A self-hosted fleet is cheaper per minute and comes with idle capacity, autoscaling, caching, and maintenance. The crossover depends on utilization more than volume. Here is how to run the numbers for your fleet.
A remote build cache turns compute minutes into storage and transfer charges. That trade is usually excellent and occasionally terrible, depending on hit rate, object size, and where the cache lives relative to the runners. Here is the arithmetic.
Blue-green doubles capacity for the length of a deploy. Canary adds a small slice plus the routing and analysis machinery to run it. Which is cheaper depends on fleet size, deploy frequency, and how long the old version lingers. Here are the numbers.
Testing Terraform means creating real resources, and real resources bill by the minute. A module test suite that provisions databases and load balancers can cost more than the infrastructure it validates. Here is how to test thoroughly without paying for it twice.
Shift-left cost estimation moves the cost conversation from the monthly invoice to the pull request, where a change is still cheap to fix. Here is how to wire it into a Terraform workflow so reviewers see the dollars before merge.
A cost diff shows how much a pull request adds to or removes from your monthly bill, not just the total. Here is why the delta matters more than the absolute number, and how to compute and present it in CI.
A cost gate fails a pull request when its estimated cost crosses a threshold, turning a budget into an automated check. Here is how to design gates that stop expensive changes without blocking everyday work.
Ephemeral environments spun up per pull request accelerate testing but multiply cost, since each one provisions real infrastructure. Here is how to estimate and control the cost of preview environments before they proliferate.
Estimating infrastructure cost without cloud credentials means pricing the Terraform plan against a catalog instead of querying the provider. Here is why credential-free estimation is faster, safer, and works in more places.
A cost comment on the pull request is where infrastructure cost becomes visible to reviewers. Here is how to build the workflow that generates a plan, prices it, and posts the cost to GitHub or GitLab automatically.
Hosted CI runners are billed per minute and get expensive at high build volume; self-hosted runners on your own compute can cost far less per minute but add operational and idle-capacity overhead. Here is the tradeoff.
CI/CD cost comes from compute minutes, caching misses, oversized runners, and redundant builds. Right-sizing runners, caching aggressively, and skipping needless work are the biggest levers. Plus, pipelines are the place to catch cloud cost before deploy.
GitHub Actions bills by the minute for hosted runners, with multipliers for larger and non-Linux runners and per-GB charges for storage and data transfer. Here is how Actions minutes are priced, what the multipliers mean, and how to cut CI costs.
GitLab CI bills compute minutes on shared runners (with a free allowance and cost factors by runner type), or you run self-managed runners on your own infrastructure. Caching, right-sized runners, and self-hosting for scale cut it. Here is the model.
Building container images consumes CI compute, and slow builds that rebuild everything waste minutes. Layer caching, small base images, and multi-stage builds cut build time and cost. Here is how.
Build artifacts, packages, and container images accumulate in storage, billed per GB, and unpruned artifacts grow the bill quietly. Retention policies, pruning, and tiering keep it flat. Here is how.
Cloud Build bills per build-minute by machine type, with a daily free allowance. Slow builds and oversized machines drive the cost. Caching, parallelism, and right-sized machines are the levers. Here is how the per-minute model works.
Add a CircleCI job that runs after terraform plan, prices the plan JSON, and comments the monthly cost on the pull request, failing the build past a budget. Here is how it fits a config.yml workflow and keeps pipelines fast.
Spacelift runs Terraform with policy-as-code and lifecycle hooks, so you can price the plan in a hook and block the run with an OPA policy when it exceeds a budget. Here is how cost estimation fits a Spacelift stack.
env0 manages Terraform environments with approval workflows and policies, so you can price the plan and gate deployments on a budget. Here is how cost estimation fits an env0 template and its policy-as-code guardrails.
Add a stage after terraform plan that prices the plan JSON and reports the monthly cost, with a budget gate that fails the build. Here's the Jenkinsfile, the plan-JSON input, and how it fits declarative pipelines.
Add a step after terraform plan that prices the plan and comments the monthly cost on the pull request, with a budget gate that fails the pipeline. Here's the bitbucket-pipelines.yml and how it fits.