I'm developing a VSTS extension in Javascript.
In one of my tasks, I need to get a link to my build results.
I tried to read from {$Build.BuildUri} but it gives me vstfs:///Build/Build/{buildId}
and not a real link.
How can I get a direct link to my build results? I need it both in build and in release pipelines.
With the introduction of Azure DevOps Services, organizational resources and APIs are now accessible via either of the following URLs: https://dev.azure.com/{organization} (new) https://{organization}.visualstudio.com (legacy)
Open your Azure DevOps Server home page ( https://{server}:DefaultCollection ). Open the extensions menu and choose Browse Marketplace. Find the extension that you want to install. Use the search box to filter the list of extensions.
To be able to publish your package in App Center we need to authorize Azure DevOps to be able to connect to it. To do that, go to App Center and inside your Profile > Account Settings > API Tokens, create a New API Token and be sure to give your key the Full Access.
You must sign in with your Azure AD account. If you don't have one, create a GitHub account now. Go to Azure DevOps and select Start free with GitHub. Enter your account credentials and go through the sign-up process.
The build result page use the URL formatted as below:
https://{vstscollectionuri}/{projectname}/_build/results?buildId={buildid}&_a=summary
And you can get these information via the Predefined Build Variables during the build. In your build task, get the following variables and then combine them to the build result URL.
- System.TeamFoundationCollectionUri
- System.TeamProject
- Build.BuildId
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