I would like to display the status of pipeline builds in Azure Pipelines in corresponding pull requests in Azure DevOps Repos.
I'd like to have some indicator which shows that a build succeeded of failed, like this (Note that this is a screenshot from the microsoft docs page, also mentioned below):
In my research I came across different solutions, including the following ones:
You can subscribe to email alerts to be notified of changes in pull requests (PRs). By default, you're subscribed to several common PR notifications. For a complete list of default subscription notifications, see Out-of-the-box (OOB) or default subscriptions.
Select View > Team Explorer to open Team Explorer. You can also press Ctrl+\, Ctrl+M. From Home, select Pull Requests to view lists of PRs opened by you or assigned to you. To view the PR list in the Azure DevOps web portal, select Actions and then select Open in browser.
Create a pull request trigger You can set up pull request triggers for both Azure Repos or GitHub repositories. From within your project, Select Pipelines > Releases, and then select your release pipeline. Under the Pull request trigger section, select the toggle button to enable it.
If you linked a build as release artifact, then you can use $(Build. BuildNumber) to get build number. If you have the issue, please provide the details of your release pipeline (Linked artifact, Docker push task setting, detail log).
The key is to configure the CI pipeline as a Build Validation requirement, in the Build Policies settings of your master branch.
When that's configured, the PR will automatically kick off a CI build, and display its status in the PR screen.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With