From 017df59c7832b14dc74dc45a4d3078fc396c3cea Mon Sep 17 00:00:00 2001 From: Vinayak <110326599+vinayakmsft@users.noreply.github.com> Date: Wed, 8 Oct 2025 12:07:06 +0530 Subject: [PATCH] Add DeploymentGroup to runsOn in task.json MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We have got one ticket from the customer for PublishCodeCoverageResult task issue. Incident-656029979 Details - IcM Repro steps: The issue can be reproduced with the following steps. 1) Start creating a classic build pipeline. 2) Add "Publish Code Coverage Results" task. 3) Right click of the task and select [Create task group]. Then, specify [Name] and then click [Create] button to save. 4) Go to [Trask groups] page and select the saved task group. 5) Add "Publish Test Results" task. 6) Change the version of "Publish Code Coverage Results" task to 1. 7) Click [Save] button. 8) Go to [Trask groups] page and select the saved task group. 9) Change the version of "Publish Code Coverage Results" task to 2. 10) Click [Save] button. ---> The error occurs. 'Meta task ' RunsOn value: 'Agent, DeploymentGroup', doesn't match with child task 'PublishCodeCoverageResults' RunsOn value: 'Agent'. Provide valid value and try again.' I think the problem is here. azure-pipelines-tasks/Tasks/PublishCodeCoverageResultsV2/task.json at master ยท microsoft/azure-pipelines-tasks "runsOn": [ "Agent" ], It does not have DeploymentGroups runs on option as other tasks (even the V1 of this task has this). --- Tasks/PublishCodeCoverageResultsV2/task.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Tasks/PublishCodeCoverageResultsV2/task.json b/Tasks/PublishCodeCoverageResultsV2/task.json index aff222194444..7f5324571f4b 100644 --- a/Tasks/PublishCodeCoverageResultsV2/task.json +++ b/Tasks/PublishCodeCoverageResultsV2/task.json @@ -10,7 +10,8 @@ "Build" ], "runsOn": [ - "Agent" + "Agent", + "DeploymentGroup" ], "author": "Microsoft Corporation", "version": { @@ -65,4 +66,4 @@ "FoundNMatchesForPattern": "Found %s result(s) matching pattern: %s", "NoCodeCoverage": "No code coverage results were found to publish." } -} \ No newline at end of file +}