Reputation: 14487
I'm trying to add my build status to GitHub readme file, but I cannot figure out where to find {guid}
and {id}
of my build.
Here is documentation: https://learn.microsoft.com/en-us/vsts/build-release/actions/ci-build-github#create-a-vsts-build-status-with-a-github-readme-file
Image tag for status:
[<img
src="https://{your-account}.visualstudio.com/_apis/public/build/definitions/{guid}/{id}/badge"/>](https://{your-account}.visualstudio.com/{your-project}/_build/index?definitionId={id})
Upvotes: 3
Views: 1584
Reputation: 33738
You need to enable Badge in the build definition:
Upvotes: 8
Reputation: 430
You can just put a link to the build definition results page, whatever you find in the web, that link will allow you to click from GitHub and go to the right place in VSTS and definition ID will show up in query parameters in the browser URL when you use VSTS UI.
Also, you can use API.Check the below document for more information.
https://www.visualstudio.com/en-us/docs/integrate/api/build/builds
Upvotes: 0