1
votes

We have developed VSTS/TFS extension which consists summary page with details generated from our extension task, at the end of build.

we have added contribution similar to below in manifest file to add this summary section

{
            "id": "build-status-section",
            "type": "ms.vss-build-web.build-results-section",
            "description": "A section contributing to our own new tab and also to existing build 'summary' tab",
            "targets": [
                ".build-info-tab",
                "ms.vss-build-web.build-results-summary-tab"
            ],
            "properties": {
                 "name": "Custom Section",
                 "uri": "statusSection.html",
                 "order": 20,
                 "height": 500
            }
        }

However currently we are facing issue as even when user not add our extension task in to his build our summary page will appear in summary tab (if our extension is installed and enabled).

Is there any way to avoid displaying summary section when our task is not added to their build. Please be kind enough to help on this.

1

1 Answers

2
votes

No, you can't hide the summary section.

This is because build-results-summary-tab is used for all builds. So when you install the extension, even you are not add the task you developed, the summary results will be showed for any of build results.

More details, you can refer Referencing contributions and types and the example as Targetable hub groups shows.

The work around is that you can separate build-results-summary-tab extension with the build task extension (use two extensions instead). For the accounts need to view the summary result, they can install the two extensions. Else, the accounts just need to install the extension for the build task.