Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Az Pipeline Tip #302

Merged
merged 1 commit into from
Jan 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
30 changes: 30 additions & 0 deletions content/pipelines-badges.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
Title: Make your pipeline badges more compact and meaningful
Date: 2022-01-17
Category: Posts
Tags: azure-devops, eliminate-waste, pipelines, tips
Slug: pipelines-streamlined-approvals
Author: Willy-Peter Schaub
Summary: Tired of cluttering your dashboards with duplicated waste?

We have dashboards with multiple pipeline badges to keep an eye on our Azure DevOps pipelines. I often wondered why we cannot change the "Azure Pipelines" label to reduce the duplication (WASTE) and make our dashboards more compact.

![Jurassic Park](../images/pipeline-badges-1.png)

Well, if you change ...

```
[![Build status](https://dev.azure.com/demo-org/demo-proj/_apis/build/status/Reporting/Azure%20Pipelines%20Totals?branchName=master)](https://dev.azure.com/demo-org/demo-proj/_build/latest?definitionId=1818)
```

... to ...

```
[![Build status](https://dev.azure.com/demo-org/demo-proj/_apis/build/status/Reporting/Azure%20Pipelines%20Totals?branchName=master&label=PIPELINE%20TOTALS)](https://dev.azure.com/demo-org/demo-proj/_build/latest?definitionId=1818)
```

... by adding by adding ```&label=<TEXT>```, you can enjoy a more compact version of your dashboard.

![SpaceX](../images/pipeline-badges-2.png)

I stumbled over this tweak in a recent Azure DevOps community chat and realized that I must read the Azure DevOps REST API documentation a bit more carefully. See **URI Parameters** in [Status Get](https://docs.microsoft.com/en-us/rest/api/azure/devops/build/status/get?view=azure-devops-rest-6.0) and notice "_Replaces the default text on the left side of the badge._"

Binary file added images/pipeline-badges-1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/pipeline-badges-2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.