CI that keeps up

Can Dagger lower CI costs?

Yes, for most pipelines, because most CI work repeats. Dagger lowers the cost in two ways. It does less work: it reuses cached results and runs only the tests that you select. It also bills less for the work it does. Dagger Cloud bills the CPU and memory that your pipeline uses, and repeat work costs 5× less. It does not lower costs in every case, and the last section says when.

Dagger does less work

The Dagger engine runs your checks and caches the result of each operation (Introduction). When the inputs of an operation do not change, the engine uses the cached result and does not run the operation again. A change to one file runs only the operations that read that file.

Dagger also sees each test, not only the job that runs it (test-native CI). When a test fails, you run only that test again, not the full suite. For example, with the official Go module:

dagger check --go-test=TestGet

The same filters select a package or a test file (Checking your code). For a large suite, Dagger splits the tests across engines. It balances the parts with the measured resource use, input cost, and cache state of each test (test splitting).

Dagger Cloud bills used resources

Most CI services bill the runner for the full time of each job, at the price of its machine size. For example, GitHub bills each GitHub-hosted runner per minute, at a rate for its type and size (GitHub runner pricing). A job that waits on the network still pays for all the cores of its runner.

Dagger Cloud bills what your pipeline uses (pricing):

  • CPU time, measured from Linux cgroups.
  • Memory, sampled each second.
  • Data that your pipeline receives, such as git objects and container images.
  • Data that your pipeline sends, such as pushed images and network egress.

Idle capacity is free. Each plan has a monthly price, and you pay the plan price or your usage, whichever is higher.

Repeat work costs 5× less

An operation is repeat work if it has the same inputs as an operation that you ran in the last 30 days (pricing). Dagger Cloud bills repeat work at one fifth of the price of new work. The discount applies when the cache does not have the result and the engine runs the operation again.

The pricing page states the reason for this rule. You pay less as your pipeline gets faster, and Dagger earns more when its cache serves more work. Other providers earn less when your pipeline gets faster.

You can run Dagger on machines you have

The Dagger engine is open source. It runs on your machine or on your own server at no cost (dagger.io). Dagger can also run a pipeline on a remote engine over SSH, on Kubernetes, or on Dagger Cloud (remote execution). Select the engine with --engine or the DAGGER_ENGINE variable (engine reference).

When Dagger does not lower costs

Dagger saves money when work repeats. These cases save less, or nothing:

  • Most inputs change on each run. New inputs get no cache result and no repeat-work price.
  • Your CI is already free. Standard GitHub-hosted runners are free for public repositories. GitHub plans also include 2,000 or 3,000 minutes each month (GitHub Actions billing).
  • Your usage is below the plan price. Dagger Cloud bills at least the monthly price of your plan.
  • Setup takes time. Official modules cover common tools. For other tools, find a module with dagger module search, or wrap the command you already run in a short module. That time is a cost too.

To compare for your own pipeline, use the bill estimate on the pricing page.

Bottom line: Dagger lowers CI costs when work repeats, which is most CI work. It reuses cached results and runs only the tests that you select. Dagger Cloud bills used CPU and memory, and repeat work costs 5× less. It saves less when inputs change on each run, or when your CI already costs nothing.