Azure Pipelines status badge not getting displayed in Markdown
Asked Answered
C

2

24

I've set up azure pipelines for one of my github repositories. Everything is working perfect except the build status badge. It is not getting displayed correctly, it seems like the image could not be loaded.

This is currently getting displayed:

The code below used in the Markdown file is automatically generated by Azure DevOps:

[![Build Status](https://dev.azure.com/larsbehl/larsbehl/_apis/build/status/LarsBehl.llCompiler?branchName=master)](https://dev.azure.com/larsbehl/larsbehl/_build/latest?definitionId=1&branchName=master)

Caesarea answered 2/11, 2019 at 19:36 Comment(0)
T
62

Allow anonymous access to badges might be disabled for your project settings.

You can go to Project Settings, click Settings under Pipelines. And make sure toggle Disable anonymous access to badges is off. Please refer to below pic.

enter image description here

Tunisia answered 4/11, 2019 at 2:22 Comment(6)
Thanks! That's the issue I was hitting. I had to first enable at the organization level; and then enable per project.Swept
To anyone having a hard time finding where to "Project Settings" is located. It's at the bottom-left corner of the project window.Broadsword
may also have to adjust settings at an organization level.Gonnella
The pipeline is connected to your repo and it cannot determine if your repo is allowed to show the badge? Where do you suppose to use the badge then if it's disabled for anonymous access?Atmolysis
This also fixes Setup Now showingReferee
@Atmolysis One example: we have the badges on internal docs, so when I'm logged in to DevOps I can see the badges fine without changing this setting.Referee
I
2

Here's how to update this setting!

Go to "Organization Settings", then find "Pipelines" > "Setting"> "Disable anonymous access to badges"

Screenshot for reference: Azure organization settings

Impaction answered 17/5, 2021 at 23:3 Comment(1)
I'm upvoting this, since this is also part of the accepted solution: if your Org Settings disable this, the project settings are not going to allow you to override that setting.Brenna

© 2022 - 2024 — McMap. All rights reserved.