Skip to content

Create Bug when pipeline fails in Azure DevOps

  • Azure DevOps
  • Automation
  • Pipelines
  • Pipeline

When a pipeline fails, create a Bug linked to that run in Azure DevOps.

Use the Create Bug when pipeline fails template in Documentero Automations. It watches every pipeline in the project and creates one Bug for each failed run.

Create Bug when pipeline fails flow overview
Flow overview: run failed, then create a Bug linked to that run.

Prerequisite: Install Automations App on your Azure DevOps organization

Trigger

Trigger — Pipeline run state changed

Fires when a pipeline run starts, is canceling, or finishes. YAML and classic builds are both included. A finished run starts the automation once. This template starts when the run is Completed and the result is Failed, for any pipeline in the project.

Configured in this template

  • Pipelines: any pipeline in this project
  • Run state: Completed
  • Result: Failed

You can customize

  • Limit Pipelines to specific definitions if only some failures should create a Bug.
  • Change the result if a canceled run should create a work item as well.
Create Bug when pipeline fails trigger
Run state changed trigger for any pipeline, Completed and Failed.
Action

Action — Create Work Item

Creates a Bug and links it to the failed run. The title includes the pipeline name and run id. The description includes the run URL. It does not link the Bug to the triggering work item.

Configured in this template

  • Work item type: Bug
  • Link to trigger: No link
  • Link to this run: yes
  • Field values:
  • - Title = Pipeline failed: {trigger.Pipeline.Name} #{trigger.Pipeline.RunId}
  • - Description = Run: {trigger.Pipeline.Url}

You can customize

  • Change the work item type if a failed run should create a Task or another type instead of a Bug.
  • Edit the title and description. Smart Values fill in the pipeline name, run id, and URL.
  • Add another Create Work Item step if one failure should create more than one item.
Create Bug when pipeline fails action 1
Create Work Item set to Bug, linked to the failed run.

Full automation

Create Bug when pipeline fails full automation
Full builder canvas for creating a Bug when a pipeline fails.

Common questions

How do I create Bug when pipeline fails in Azure DevOps?
When a pipeline fails, create a Bug linked to that run in Azure DevOps. Use the Create Bug when pipeline fails template in Documentero Automations: open Templates, pick this flow, review the Bug fields, and enable it.
Can this create a Task instead of a Bug?
Yes. On Create Work Item, change the work item type from Bug to Task, or to another type in the project process.
Which pipelines start this automation?
Any pipeline in the project, when the run is Completed and the result is Failed. You can narrow Pipelines to specific definitions.
How is the new Bug tied to the run?
Link to this run is yes. The title is “Pipeline failed:” plus the pipeline name and run id, and the description contains the run URL.

Visual Studio Marketplace

Automations

Automate Azure DevOps workflows with triggers, actions, conditions, and scheduled rules.

Get it free