rootDir sets where a service builds from, and buildFilter decides whether a push
rebuilds the repository’s services at all.
Setting a root directory
rootDir is the directory a service builds from. Paths inside the service, including
dockerfilePath and publish, are relative to it.
slipway.yaml
rootDir on a service that builds, it defaults to the repository root.
dockerContext narrows the Docker build context below rootDir, for the case where the
Dockerfile needs to see less than the whole directory.
Rebuilding only what changed
By default, a push to the tracked branch redeploys every service in the source that has auto-deploy on, whichever files changed. AbuildFilter restricts that to pushes which
touch files you care about.
slipway.yaml
At least one of the two must be non-empty. A block declaring neither fails validation, and
so does an empty or whitespace-only pattern, or one that is not a valid glob.
How a push is evaluated
A changed file is relevant when it matchespaths (or paths is empty) and matches no
entry in ignoredPaths. If a push contains no relevant file, the auto-deploy is skipped.
A manual deploy always runs. Build filters only affect what a push triggers, so you are
never locked out of deploying.
A worked layout
For a repository shaped like this:rootDir, and set the filter so a change to shared/ rebuilds both:
slipway.yaml
Several repositories in one project
A project is not limited to one repository. Add a source per repo and they deploy together into the same network, reaching each other by service name. See Projects. Sources added this way default to auto-deploy off, so turn it on per source when you want pushes to redeploy them.FAQ
Does a build filter save money? Yes. A skipped build runs no build machine, so a push that touches only documentation costs nothing. Can two services share arootDir?
Yes. Two services can build from the same directory with different Dockerfiles or
targets.