Typed artifacts
In Dagger 1.0, your entire project — source code, containers, binaries, generated files, even tests — is available as typed artifacts. Modules discover the artifacts in your project; you select them with typed filters; Dagger computes them on demand and caches them. Then you use the artifacts in your workflow. For example, you can use test results as a gate, publish containers to a registry, or open an interactive shell to inspect an intermediate result. Every artifact also has a URI, called a DAG link. You can send it to a teammate, or give it to another module as an input.
The modules find these artifacts at runtime. You do not configure them. When you add a package or a test, it appears in the list.
- Select. Each column is a filter. For example,
--go-test=TestGetselects that test in every package, and--vitest-test-file=src/cart.test.tsselects one test file. The same filters work indagger check,dagger call, DAG links and agent tools. - Compute. Dagger computes only the artifacts that you select. The module decides how: for example, two Go tests in one package run in one
go test. If the inputs did not change, Dagger gets the result from the cache. - Link. A DAG link names one artifact with its filters, for example
dag://github.com/dagger/dagger#main?go-test=TestFoo. You can give a DAG link anywhere Dagger expects a container, a file or a directory: on the command line, indagger.toml, or in native configuration such as a//go:generatedirective. For example, one link gives the Go module a base image that your own module builds. You do not need glue code. - Use. A check, such as a test or a linter, passes or fails, so you can use it as a gate. A
stalecheck finds generated files that are out of date.
You get full context for every artifact that ever touched your supply chain: what it is made of, how it was made, and how it was used. Every input is content-addressed, and every step is traced end to end.
The official modules for Go, Python and JavaScript tools already support artifacts.
$ dagger check -l --all
MODULE GO-PACKAGE GO-TEST VITEST-PROJECT VITEST-TEST-FILE CHECK DESCRIPTION
go . stale Check go generate output.
go store stale Check go generate output.
go . TestHello test Run this test.
go store TestGet test Run this test.
vitest web src/cart.test.ts test Run this test file.
vitest web src/login.test.ts test Run this test file.