New to Kestra?
Use blueprints to kickstart your first workflows.
Confirm the Dagger engine is reachable, then optionally run its own local-cache prune as scheduled maintenance instead of automatic GC.
The Dagger engine's own garbage collector only prunes the local cache once disk usage crosses its own internal threshold, which means cache entries a team wanted to keep can disappear at an unpredictable moment chosen by disk pressure, not by policy. Running the engine's own documented prune command on a schedule, instead, puts that decision back under a team's control. This blueprint confirms the engine is actually executing containers, not just that the CLI binary is present, before deciding whether to run that maintenance step at all.
probe_engine_connectivity (io.kestra.plugin.dagger.Commands) runs a trivial
pipeline, container | from alpine | with-exec echo DAGGER_ENGINE_OK | stdout, with
allowFailure: true so a broken install or unreachable engine does not stop the flow
before it can be classified as PROBE_FAILED below.classify_engine_status (io.kestra.plugin.core.debug.Return) returns
PROBE_FAILED when the probe did not return at all, HEALTHY otherwise.route_by_engine_status (io.kestra.plugin.core.flow.Switch) branches on that
status. On HEALTHY, a nested io.kestra.plugin.core.flow.If runs
dagger core engine local-cache prune only when auto_prune_cache is true, and a
second If fails loudly to Slack if the prune itself did not complete, rather than
reporting a failed prune as a success. On PROBE_FAILED, Slack is alerted instead. A
defaults branch logs anything unexpected.log_audit_summary always runs last. The errors block posts to Slack if the flow
itself fails outside the gate logic above.io.kestra.plugin.dagger.Commands beyond a single one-off pipeline call.Dagger's engine has no scheduler of its own, cache maintenance either happens automatically at a disk-pressure threshold or has to be triggered by hand. Kestra adds the schedule, the pre-check that the engine is actually healthy first, and the Slack alert on either a connectivity or a prune failure, as one declarative, auditable flow.
io.kestra.plugin.core.runner.Process task runner, with
network access to install the pinned Dagger CLI if not already present, and a
reachable Dagger engine, either local (Docker Desktop style) or remote.dagger command executes, no separate engine
container needs to be started by hand.SLACK_WEBHOOK: Slack incoming webhook URL used by the alert tasks and the errors
block.
In Kestra OSS, set this as a base64-encoded environment variable, for example
SECRET_SLACK_WEBHOOK.
SLACK_WEBHOOK secret.HEALTHY and take no
maintenance action since auto_prune_cache defaults to false.auto_prune_cache: true, it should report the prune completing on
the already-confirmed-healthy engine.every_night trigger.dagger core engine local-cache entry-set for real cache size and entry count
once you have confirmed its exact output format against your own installed Dagger
version, this blueprint deliberately does not parse that output since the exact field
names were not confirmed against primary documentation at build time.--use-default-policy or an explicit space-threshold flag to
local-cache prune, once confirmed against your installed version's own --help
output, to prune to a specific target rather than the command's own default behavior.local-cache entry-set for a cache size
or entry count, I could not confirm its exact JSON or table output shape against
primary Dagger documentation, only secondary sources, so no threshold-based
classification is built on top of it. See How to extend before relying on that data.probe_engine_connectivity only confirms the engine executed one Alpine container
successfully, not that a real, larger pipeline using your own images and registries
will also succeed.local-cache prune removes cache entries. On a shared engine serving several
pipelines, this can increase build time for whichever pipeline runs next and has to
rebuild from a cold cache, time this trigger for a genuinely idle window.