New to Kestra?
Use blueprints to kickstart your first workflows.
Clone source, build a Docker image, validate it, and fan out deployment to vCenter-managed machines with concurrency-limited rollouts in Kestra.
A compact build-and-rollout pipeline for VM fleets. The flow clones application source, builds a Docker image, runs a validation step, then fans out deployment across a machine list fetched at runtime, capping parallel rollouts so you never take down more than a couple of hosts at once. The machine list, validation, and deployment steps are deliberate stubs marking exactly where your vCenter API, image scanner, and rollout mechanism plug in.
getDeployMachinesListFromAPI task (io.kestra.plugin.core.output.OutputValues) provides a structured list of target machines (hostname, IP, owning service account); swap it for an io.kestra.plugin.core.http.Request against your vCenter or CMDB API.buildImages task (io.kestra.plugin.core.flow.WorkingDirectory) shares a filesystem between the clone and the build: cloneSourceCode (io.kestra.plugin.git.Clone) checks out main into src, and buildDockerImage (io.kestra.plugin.docker.Build) builds from an inline Dockerfile that copies files from the checkout, tagging my-app-image:latest and exposing imageId as an output.validateImage task (io.kestra.plugin.scripts.powershell.Commands) is the hook for image scanning or smoke tests before anything ships.deployImages task (io.kestra.plugin.core.flow.ForEach with concurrencyLimit: 2) iterates the machine list; each iteration extracts fields with jq filters (taskrun.value | jq('.hostName') | first) and hands them to the deployment stub, which you replace with a Subflow or SSH-based rollout.Shell scripts that build and scp images have no concurrency control, no shared artifact metadata, and no per-host visibility. Kestra gives the rollout structure: the image id flows from the build task into every deployment iteration, ForEach with concurrencyLimit throttles blast radius, each machine's deployment is a separately retryable task run, and the whole pipeline can be triggered by a Git push, a schedule, or an upstream flow.
docker.Build.DOCKERHUB_USERNAME, DOCKERHUB_PASSWORD on a push: true build).cloneSourceCode at your repository and adjust the Dockerfile.io.kestra.plugin.fs.ssh.Command, or vCenter API calls).push: true and credentials to docker.Build.io.kestra.plugin.core.flow.Pause approval between validation and rollout.validateImage and fail the flow on critical CVEs.