Clear Pulsar backlogs held by subscriptions nobody consumes
Detect Apache Pulsar subscriptions with no consumers that still pin a large backlog, then clear or remove them behind a dry run, an approval pause and a live re-read that fails the run.
Clone a GitHub repository and run its shell scripts in Docker with Kestra. Keep automation version-controlled, reproducible, and orchestrated end to end.
id: git-scripts
namespace: company.team
tasks:
- id: scripts
type: io.kestra.plugin.core.flow.WorkingDirectory
tasks:
- id: clone_repository
type: io.kestra.plugin.git.Clone
url: https://github.com/kestra-io/scripts
branch: main
- id: run_script
type: io.kestra.plugin.scripts.shell.Commands
taskRunner:
type: io.kestra.plugin.scripts.runner.docker.Docker
commands:
- cd shell
- chmod +x hello_world.sh
- ./hello_world.sh
Run shell scripts straight from a Git repository instead of pasting them into a scheduler. This blueprint clones a GitHub repo, then executes a versioned shell script inside an isolated Docker container, so your automation logic stays in source control, code-reviewed and reproducible. It is the GitOps pattern for operational scripting: the repository is the single source of truth, and Kestra is the engine that runs it on demand or on a schedule.
io.kestra.plugin.core.flow.WorkingDirectory task (scripts) opens a shared working directory so the clone and the script run share the same filesystem.io.kestra.plugin.git.Clone task (clone_repository) clones https://github.com/kestra-io/scripts at the main branch into that directory.io.kestra.plugin.scripts.shell.Commands task (run_script) runs on the io.kestra.plugin.scripts.runner.docker.Docker task runner: it changes into the shell folder, makes hello_world.sh executable with chmod +x, and executes it.Git has no scheduler and no execution engine: it stores your scripts but never runs them. Cron on a server runs scripts but loses version history, retries, and observability. Kestra closes that gap. Declarative YAML defines the clone and run steps, event triggers and schedules fire executions automatically, per-task retries and timeouts handle flaky steps, and every run is captured with logs and lineage so you can see exactly which commit produced which result.
Docker task runner.This blueprint clones a public repository, so no secrets are required. For private repositories, add username and password (or a token) to the clone_repository task and store them with {{ secret('GIT_USERNAME') }} and {{ secret('GIT_PASSWORD') }}.
clone_repository then run_script in the logs.url and branch at your own repository and script path.hello_world.sh for any script, or chain multiple Commands steps.Schedule or webhook trigger to run on a cadence or on push.username/password to clone private repositories.