New to Kestra?
Use blueprints to kickstart your first workflows.
Orchestrate a Terraform, Ansible, and Jenkins pipeline in Kestra. Provision a fleet, apply a playbook, run a Jenkins test, poll to completion, and alert Discord.
Stitch infrastructure provisioning, configuration management, and CI testing into one governed pipeline. This blueprint chains Terraform, Ansible, and Jenkins in a single Kestra flow: Terraform provisions a test fleet, Ansible applies the baseline configuration, Kestra triggers a Jenkins test job, then polls Jenkins until the build reaches a terminal result and reports the outcome to Discord. It solves the classic cross-tool handoff problem, where Terraform, Ansible, and Jenkins each have their own runner and scheduler but nothing coordinates them end to end or surfaces a single pass or fail signal.
terraform_apply (io.kestra.plugin.terraform.cli.TerraformCLI) runs terraform init then terraform apply -auto-approve inside a hashicorp/terraform Docker task runner to provision the test fleet.ansible_configure (io.kestra.plugin.ansible.cli.AnsibleCLI) runs ansible-playbook against the inventory inside a cytopia/ansible Docker task runner to apply the baseline.jenkins_test (io.kestra.plugin.jenkins.JobBuild) triggers the configured Jenkins test job using the serverUrl and jobName inputs with Basic Auth.wait_for_jenkins (io.kestra.plugin.core.flow.Sequential) wraps an HTTP test_status call to the Jenkins lastBuild/api/json endpoint and an assert_test_done check (io.kestra.plugin.core.execution.Assert). A constant retry (PT15S, up to 80 attempts) re-runs the block until result is non-empty.notify (io.kestra.plugin.discord.DiscordIncomingWebhook) posts the chain outcome to Discord; an alert_on_failure error handler posts a failure message if any step fails.lastBuild rather than a fragile fixed wait.Terraform, Ansible, and Jenkins each ship their own runner and scheduler, but none of them coordinates the others or gives you one lineage view across the whole chain. Kestra adds event and schedule triggers, per-step retries (the wait_for_jenkins block polls Jenkins safely), a single execution timeline with full lineage, and declarative YAML you can version and review. The gap Jenkins's own scheduler cannot fill: it has no awareness of the Terraform and Ansible steps that must succeed first, and no native way to gate, retry, and report on them as one unit.
hashicorp/terraform and cytopia/ansible images).JENKINS_USERNAME: Jenkins user for Basic Auth.JENKINS_API_TOKEN: Jenkins API token.DISCORD_WEBHOOK_URL: Discord incoming webhook URL.jenkins_url input and provide the jenkins_test_job name.random_pet) and Ansible (localhost ping) content with your real configuration.If task between wait_for_jenkins and notify.jobName and the lastBuild URI path accordingly.