name: Triage failed GitLab pipeline
enabled: true
on:
pipeline: {}
steps:
- id: only_failed
type: check
if: "{{pipeline.failed}} == true"
else: stop
- id: triage
type: agent
agent: developer
repository: "{{project.path_with_namespace}}"
branch: "{{pipeline.ref}}"
prompt: |
GitLab pipeline {{pipeline.id}} failed on {{pipeline.ref}}.
Project: {{project.path_with_namespace}}
URL: {{pipeline.url}}
Read .gitlab-ci.yml (and includes), identify the failing job, then
inspect the application code those jobs run. Suggest cause and owners.
- type: notify
title: Pipeline triage ready
body: "{{project.path_with_namespace}} {{pipeline.ref}} — {{steps.triage.summary}}"