New to Kestra?
Use blueprints to kickstart your first workflows.
Run a GitLab CI pipeline from an upstream event with Kestra. A webhook starts the pipeline over REST, polls until it finishes, and alerts Slack.
Run a GitLab CI pipeline from an upstream event instead of waiting for a Git push or a fixed schedule. This blueprint lets any system (a data load, an approval, a deploy gate, another flow) start a GitLab CI pipeline over the REST API, then blocks until the pipeline reaches a terminal state and reports the outcome to Slack. It closes the gap between event driven orchestration and GitLab CI, which on its own reacts mainly to commits, tags, and cron rules.
io.kestra.plugin.core.trigger.Webhook trigger (on_event) exposes a keyed URL that an upstream system POSTs to in order to start the flow.trigger_pipeline (io.kestra.plugin.core.http.Request) POSTs multipart/form-data to /api/v4/projects/{project_id}/trigger/pipeline using a GitLab pipeline trigger token and the chosen ref, creating a new pipeline.wait_for_pipeline (io.kestra.plugin.core.flow.Sequential) wraps the polling logic with a constant retry of PT15S for up to 80 attempts (a 20 minute ceiling).check_pipeline GETs /api/v4/projects/{project_id}/pipelines/{id} with the PRIVATE-TOKEN header, and assert_terminal (io.kestra.plugin.core.execution.Assert) fails the block until finished_at is set, which forces the retry to poll again.notify (io.kestra.plugin.slack.notifications.SlackIncomingWebhook) posts the final pipeline status to Slack, and an errors handler alerts Slack if the trigger or polling fails.gitlab_url.GitLab CI triggers on commits, tags, merge requests, and schedules. It cannot natively start on an arbitrary upstream business event or wait on it as one step in a larger DAG. Kestra adds an event trigger, retries with a bounded polling window, full execution lineage, and Slack alerting, all in declarative YAML. You get one place to see why a pipeline ran, what it produced, and what happened next.
A GitLab project with a .gitlab-ci.yml pipeline, and a Slack incoming webhook.
GITLAB_TRIGGER_TOKEN: a GitLab pipeline trigger token (Settings, CI/CD, Pipeline trigger tokens).GITLAB_TOKEN: a personal or project access token with api scope, used to read pipeline status.GITLAB_CI_WEBHOOK_KEY: key guarding the Kestra webhook trigger.SLACK_WEBHOOK_URL: Slack incoming webhook URL.project_id and ref (and gitlab_url for self hosted GitLab).wait_for_pipeline retry block (interval, maxAttempt) for longer pipelines.outputs.check_pipeline.body.status to trigger a rollback or a downstream flow.formData to pass pipeline variables into GitLab CI.