Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Display HTML content in VSTS/TFS build summary without using contribution in manifest file

I have developed VSTS extension and I need to display graphical content (HTML page) in my VSTS/TFS summary page without using contribution in manifest file. Reason that led me to reject this option (e.g. ms.vss-build-web.build-results-section) is that when we are installed our extension, even if it is not included in current build task list, summary section defined in contribution started to appear in build summary.And this cause bad user experience.

I observed that some extensions such as sonar cube are using different mechanism to display data in summary tab (https://marketplace.visualstudio.com/items?itemName=SonarSource.sonarqube). However I couldn't figure out the way this achieved.

It would be great help if you can provide tips to append summary information dynamically in the build result page. It will be much helpful if you can provide a sample.

This question is related to question I asked in : Hide VSTS/TFS extension's Summary section when extension not added to build task

like image 403
Lalindu Avatar asked Dec 08 '25 11:12

Lalindu


1 Answers

Just call ##vso[task.uploadsummary]local file path in your build task.

For example:

Write-Host "##vso[task.addattachment type=Distributedtask.Core.Summary;name=SonarQube Analysis Report;]$reportPath"

More information, refer to logging commands.

BTW, about the source code of the extension, you can download the extension and change the file name suffix to XXX.zip, then unzip the file.

like image 105
starian chen-MSFT Avatar answered Dec 11 '25 01:12

starian chen-MSFT



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!