Files

2.0 KiB

IntegraCI — Standard Build Dagger Module

Standard build pipeline: lint → test → build → container image.

Functions

Function What it does
build lint → test → image (→ publish when --image-ref is given). A root Dockerfile wins over --language: the tree is built from it and the language lane is skipped (--ignore-dockerfile=true forces the lane). Languages outside go/python/node/php always need a Dockerfile. A <Dockerfile>.dockerignore beside the Dockerfile being built is applied by the module itself. For the .integraci/Dockerfile IntegraCI generates: after the context's root .dockerignore and without the sidecar's ! re-includes, so no rule can bring back what it excludes, and a symlinked or non-regular ignore file refuses the build. For your own Dockerfile: BuildKit's rule -- the sidecar replaces the root file and keeps its ! lines.
test lint + tests of the language lane only — no image, no publish. image_ref is always empty. Runs the lane even when a Dockerfile is present (a Dockerfile says how to package, not how to test); an unknown language is an error. Python accepts pyproject.toml (uv pip install -e ".[dev]") or brownfield requirements.txt (+ ruff/pytest). Use this for the pipeline's "Lint and Test" stage instead of running npm ci / pip / golangci-lint / docker run natively on an agent that has no toolchains.

Usage

dagger call build --source . --language go
dagger call build --source . --language python
dagger call build --source . --language node
dagger call build --source . --language php   # no Dockerfile: php:8.3-apache + your tree
dagger call build --source . --language node --ignore-dockerfile=true   # lane, even with a Dockerfile

dagger call test --source . --language node   # lint + tests, no image
dagger call test --source . --language php --runtime-version 7.4
dagger call test --source . --language java --java-version 17   # JDK 11, 17 or 21 (default 21)