Skip to content

Commit

Permalink
Removing the deprecation tag for PCCRV1 (#20549)
Browse files Browse the repository at this point in the history
* Removing the deprecation tag for PCCRV1

* resolving erroers

* resolving build error

* nit changes

* nit changes1
  • Loading branch information
vinayakmsft authored Oct 17, 2024
1 parent 1c963c1 commit 3cb05b7
Show file tree
Hide file tree
Showing 13 changed files with 137 additions and 146 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"loc.friendlyName": "[To be deprecated] Publish code coverage",
"loc.friendlyName": "Publish code coverage",
"loc.helpMarkDown": "[Learn more about this task](https://go.microsoft.com/fwlink/?LinkID=626485)",
"loc.description": "[DEPRECATION WARNING! Users are recommended to switch to version 2*.] Publish Cobertura or JaCoCo code coverage results from a build",
"loc.description": "Publish Cobertura or JaCoCo code coverage results from a build",
"loc.instanceNameFormat": "Publish code coverage from $(summaryFileLocation)",
"loc.input.label.codeCoverageTool": "Code coverage tool",
"loc.input.help.codeCoverageTool": "[DEPRECATION WARNING! Users are recommended to switch to task version 2*. For more details, see https://devblogs.microsoft.com/devops/new-pccr-task.] The tool with which code coverage results are generated.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ async function run() {
try {
// Initialize localization
tl.setResourcePath(path.join(__dirname, 'task.json'));

// Log warning for PCCR V1 task deprecation
tl.warning(tl.loc('V1TaskDeprecationNotice'));


// Get input values
const codeCoverageTool = tl.getInput('codeCoverageTool', true);
const summaryFileLocation = tl.getInput('summaryFileLocation', true);
Expand Down
210 changes: 105 additions & 105 deletions Tasks/PublishCodeCoverageResultsV1/task.json
Original file line number Diff line number Diff line change
@@ -1,107 +1,107 @@
{
"id": "2A7EBC54-C13E-490E-81A5-D7561AB7CD97",
"name": "PublishCodeCoverageResults",
"friendlyName": "[To be deprecated] Publish code coverage",
"description": "[DEPRECATION WARNING! Users are recommended to switch to version 2*.] Publish Cobertura or JaCoCo code coverage results from a build",
"helpUrl": "https://docs.microsoft.com/azure/devops/pipelines/tasks/test/publish-code-coverage-results",
"helpMarkDown": "[Learn more about this task](https://go.microsoft.com/fwlink/?LinkID=626485)",
"category": "Test",
"visibility": [
"Build"
],
"runsOn": [
"Agent",
"DeploymentGroup"
],
"author": "Microsoft Corporation",
"version": {
"Major": 1,
"Minor": 244,
"Patch": 0
},
"demands": [],
"minimumAgentVersion": "2.182.1",
"instanceNameFormat": "Publish code coverage from $(summaryFileLocation)",
"deprecated": true,
"deprecationMessage": "The PublishCodeCoverageResults@1 is deprecated. Users are recommended to switch to task version 2. For more details, see https://devblogs.microsoft.com/devops/new-pccr-task",
"inputs": [
{
"name": "codeCoverageTool",
"type": "pickList",
"label": "Code coverage tool",
"required": true,
"defaultValue": "JaCoCo",
"helpMarkDown": "[DEPRECATION WARNING! Users are recommended to switch to task version 2*. For more details, see https://devblogs.microsoft.com/devops/new-pccr-task.] The tool with which code coverage results are generated.",
"options": {
"Cobertura": "Cobertura",
"JaCoCo": "JaCoCo"
}
},
{
"name": "summaryFileLocation",
"type": "string",
"label": "Summary file",
"defaultValue": "",
"required": true,
"helpMarkDown": "Path of the summary file containing code coverage statistics, such as line, method, and class coverage. The value may contain minimatch patterns. For example: `$(System.DefaultWorkingDirectory)/MyApp/**/site/cobertura/coverage.xml`"
},
{
"name": "pathToSources",
"type": "string",
"label": "Path to Source files",
"defaultValue": "",
"required": false,
"helpMarkDown": "Path to source files is required when coverage XML reports do not contain absolute path to source files. For e.g., JaCoCo reports do not use absolute paths and when publishing JaCoCo coverage for Java apps, the pattern would be similar to `$(System.DefaultWorkingDirectory)/MyApp/src/main/java/`.<br />This input is also needed if tests are run in a docker container. This input should point to absolute path to source files on the host. For e.g., `$(System.DefaultWorkingDirectory)/MyApp/`"
},
{
"name": "reportDirectory",
"type": "string",
"label": "Report directory",
"defaultValue": "",
"required": false,
"helpMarkDown": "Path of the code coverage HTML report directory. The report directory is published for later viewing as an artifact of the build. The value may contain minimatch patterns. For example: `$(System.DefaultWorkingDirectory)/MyApp/**/site/cobertura`"
},
{
"name": "additionalCodeCoverageFiles",
"type": "string",
"label": "Additional files",
"defaultValue": "",
"required": false,
"helpMarkDown": "File path pattern specifying any additional code coverage files to be published as artifacts of the build. The value may contain minimatch patterns. For example: `$(System.DefaultWorkingDirectory)/**/*.exec`"
},
{
"name": "failIfCoverageEmpty",
"type": "boolean",
"label": "Fail when code coverage results are missing",
"defaultValue": "false",
"required": false,
"helpMarkDown": "Fail the task if code coverage did not produce any results to publish."
}
],
"execution": {
"Node10": {
"target": "publishcodecoverageresults.js",
"argumentFormat": ""
},
"Node16": {
"target": "publishcodecoverageresults.js",
"argumentFormat": ""
}
},
"restrictions": {
"settableVariables": {
"allowed": []
}
},
"messages": {
"FoundNMatchesForPattern": "Found %s result(s) matching pattern: %s",
"MultipleSummaryFilesFound": "Multiple file or directory matches were found. Using the first match: %s",
"NoCodeCoverage": "No code coverage results were found to publish.",
"InstallDotNetCoreForHtmlReport": "Please install dotnet core to enable automatic generation of Html report.",
"FailedToGenerateHtmlReport": "Failed to generate Html report. Error: %s",
"IgnoringReportDirectory": "Ignoring coverage report directory with Html content as we are auto-generating Html content",
"UpgradeAgentMessage": "Please upgrade your agent version. https://github.com/Microsoft/vsts-agent/releases",
"GeneratedHtmlReport": "Generated code coverage html report: %s",
"V1TaskDeprecationNotice": "New V2 version of task publishing code coverage results is available to all our customers now. We highly recommend to stop using the V1 version and migrate to V2 version (https://learn.microsoft.com/azure/devops/pipelines/tasks/reference/publish-code-coverage-results-v2). For more details, see - https://devblogs.microsoft.com/devops/new-pccr-task."
}
"id": "2A7EBC54-C13E-490E-81A5-D7561AB7CD97",
"name": "PublishCodeCoverageResults",
"friendlyName": "Publish code coverage",
"description": "Publish Cobertura or JaCoCo code coverage results from a build",
"helpUrl": "https://docs.microsoft.com/azure/devops/pipelines/tasks/test/publish-code-coverage-results",
"helpMarkDown": "[Learn more about this task](https://go.microsoft.com/fwlink/?LinkID=626485)",
"category": "Test",
"visibility": [
"Build"
],
"runsOn": [
"Agent",
"DeploymentGroup"
],
"author": "Microsoft Corporation",
"version": {
"Major": 1,
"Minor": 247,
"Patch": 0
},
"demands": [],
"minimumAgentVersion": "2.182.1",
"instanceNameFormat": "Publish code coverage from $(summaryFileLocation)",
"deprecated": true,
"deprecationMessage": "The PublishCodeCoverageResults@1 is deprecated. Users are recommended to switch to task version 2. For more details, see https://devblogs.microsoft.com/devops/new-pccr-task",
"inputs": [
{
"name": "codeCoverageTool",
"type": "pickList",
"label": "Code coverage tool",
"required": true,
"defaultValue": "JaCoCo",
"helpMarkDown": "The tool with which code coverage results are generated.",
"options": {
"Cobertura": "Cobertura",
"JaCoCo": "JaCoCo"
}
},
{
"name": "summaryFileLocation",
"type": "string",
"label": "Summary file",
"defaultValue": "",
"required": true,
"helpMarkDown": "Path of the summary file containing code coverage statistics, such as line, method, and class coverage. The value may contain minimatch patterns. For example: `$(System.DefaultWorkingDirectory)/MyApp/**/site/cobertura/coverage.xml`"
},
{
"name": "pathToSources",
"type": "string",
"label": "Path to Source files",
"defaultValue": "",
"required": false,
"helpMarkDown": "Path to source files is required when coverage XML reports do not contain absolute path to source files. For e.g., JaCoCo reports do not use absolute paths and when publishing JaCoCo coverage for Java apps, the pattern would be similar to `$(System.DefaultWorkingDirectory)/MyApp/src/main/java/`.<br />This input is also needed if tests are run in a docker container. This input should point to absolute path to source files on the host. For e.g., `$(System.DefaultWorkingDirectory)/MyApp/`"
},
{
"name": "reportDirectory",
"type": "string",
"label": "Report directory",
"defaultValue": "",
"required": false,
"helpMarkDown": "Path of the code coverage HTML report directory. The report directory is published for later viewing as an artifact of the build. The value may contain minimatch patterns. For example: `$(System.DefaultWorkingDirectory)/MyApp/**/site/cobertura`"
},
{
"name": "additionalCodeCoverageFiles",
"type": "string",
"label": "Additional files",
"defaultValue": "",
"required": false,
"helpMarkDown": "File path pattern specifying any additional code coverage files to be published as artifacts of the build. The value may contain minimatch patterns. For example: `$(System.DefaultWorkingDirectory)/**/*.exec`"
},
{
"name": "failIfCoverageEmpty",
"type": "boolean",
"label": "Fail when code coverage results are missing",
"defaultValue": "false",
"required": false,
"helpMarkDown": "Fail the task if code coverage did not produce any results to publish."
}
],
"execution": {
"Node10": {
"target": "publishcodecoverageresults.js",
"argumentFormat": ""
},
"Node16": {
"target": "publishcodecoverageresults.js",
"argumentFormat": ""
}
},
"restrictions": {
"settableVariables": {
"allowed": []
}
},
"messages": {
"FoundNMatchesForPattern": "Found %s result(s) matching pattern: %s",
"MultipleSummaryFilesFound": "Multiple file or directory matches were found. Using the first match: %s",
"NoCodeCoverage": "No code coverage results were found to publish.",
"InstallDotNetCoreForHtmlReport": "Please install dotnet core to enable automatic generation of Html report.",
"FailedToGenerateHtmlReport": "Failed to generate Html report. Error: %s",
"IgnoringReportDirectory": "Ignoring coverage report directory with Html content as we are auto-generating Html content",
"UpgradeAgentMessage": "Please upgrade your agent version. https://github.com/Microsoft/vsts-agent/releases",
"GeneratedHtmlReport": "Generated code coverage html report: %s",
"V1TaskDeprecationNotice": "New V2 version of task publishing code coverage results is available to all our customers now. We highly recommend to stop using the V1 version and migrate to V2 version (https://learn.microsoft.com/azure/devops/pipelines/tasks/reference/publish-code-coverage-results-v2). For more details, see - https://devblogs.microsoft.com/devops/new-pccr-task."
}
}
2 changes: 1 addition & 1 deletion Tasks/PublishCodeCoverageResultsV1/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"author": "Microsoft Corporation",
"version": {
"Major": 1,
"Minor": 244,
"Minor": 247,
"Patch": 0
},
"demands": [],
Expand Down
4 changes: 2 additions & 2 deletions _generated/PublishCodeCoverageResultsV1.versionmap.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Default|1.244.0
Node20_229_4|1.244.1
Default|1.247.0
Node20_229_4|1.247.1
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"loc.friendlyName": "[To be deprecated] Publish code coverage",
"loc.friendlyName": "Publish code coverage",
"loc.helpMarkDown": "[Learn more about this task](https://go.microsoft.com/fwlink/?LinkID=626485)",
"loc.description": "[DEPRECATION WARNING! Users are recommended to switch to version 2*.] Publish Cobertura or JaCoCo code coverage results from a build",
"loc.description": "Publish Cobertura or JaCoCo code coverage results from a build",
"loc.instanceNameFormat": "Publish code coverage from $(summaryFileLocation)",
"loc.input.label.codeCoverageTool": "Code coverage tool",
"loc.input.help.codeCoverageTool": "[DEPRECATION WARNING! Users are recommended to switch to task version 2*. For more details, see https://devblogs.microsoft.com/devops/new-pccr-task.] The tool with which code coverage results are generated.",
"loc.input.help.codeCoverageTool": "The tool with which code coverage results are generated.",
"loc.input.label.summaryFileLocation": "Summary file",
"loc.input.help.summaryFileLocation": "Path of the summary file containing code coverage statistics, such as line, method, and class coverage. The value may contain minimatch patterns. For example: `$(System.DefaultWorkingDirectory)/MyApp/**/site/cobertura/coverage.xml`",
"loc.input.label.pathToSources": "Path to Source files",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ async function run() {
try {
// Initialize localization
tl.setResourcePath(path.join(__dirname, 'task.json'));

// Log warning for PCCR V1 task deprecation
tl.warning(tl.loc('V1TaskDeprecationNotice'));


// Get input values
const codeCoverageTool = tl.getInput('codeCoverageTool', true);
const summaryFileLocation = tl.getInput('summaryFileLocation', true);
Expand Down
12 changes: 6 additions & 6 deletions _generated/PublishCodeCoverageResultsV1/task.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"id": "2A7EBC54-C13E-490E-81A5-D7561AB7CD97",
"name": "PublishCodeCoverageResults",
"friendlyName": "[To be deprecated] Publish code coverage",
"description": "[DEPRECATION WARNING! Users are recommended to switch to version 2*.] Publish Cobertura or JaCoCo code coverage results from a build",
"friendlyName": "Publish code coverage",
"description": "Publish Cobertura or JaCoCo code coverage results from a build",
"helpUrl": "https://docs.microsoft.com/azure/devops/pipelines/tasks/test/publish-code-coverage-results",
"helpMarkDown": "[Learn more about this task](https://go.microsoft.com/fwlink/?LinkID=626485)",
"category": "Test",
Expand All @@ -16,7 +16,7 @@
"author": "Microsoft Corporation",
"version": {
"Major": 1,
"Minor": 244,
"Minor": 247,
"Patch": 0
},
"demands": [],
Expand All @@ -31,7 +31,7 @@
"label": "Code coverage tool",
"required": true,
"defaultValue": "JaCoCo",
"helpMarkDown": "[DEPRECATION WARNING! Users are recommended to switch to task version 2*. For more details, see https://devblogs.microsoft.com/devops/new-pccr-task.] The tool with which code coverage results are generated.",
"helpMarkDown": "The tool with which code coverage results are generated.",
"options": {
"Cobertura": "Cobertura",
"JaCoCo": "JaCoCo"
Expand Down Expand Up @@ -105,7 +105,7 @@
"V1TaskDeprecationNotice": "New V2 version of task publishing code coverage results is available to all our customers now. We highly recommend to stop using the V1 version and migrate to V2 version (https://learn.microsoft.com/azure/devops/pipelines/tasks/reference/publish-code-coverage-results-v2). For more details, see - https://devblogs.microsoft.com/devops/new-pccr-task."
},
"_buildConfigMapping": {
"Default": "1.244.0",
"Node20_229_4": "1.244.1"
"Default": "1.247.0",
"Node20_229_4": "1.247.1"
}
}
6 changes: 3 additions & 3 deletions _generated/PublishCodeCoverageResultsV1/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"author": "Microsoft Corporation",
"version": {
"Major": 1,
"Minor": 244,
"Minor": 247,
"Patch": 0
},
"demands": [],
Expand Down Expand Up @@ -105,7 +105,7 @@
"V1TaskDeprecationNotice": "ms-resource:loc.messages.V1TaskDeprecationNotice"
},
"_buildConfigMapping": {
"Default": "1.244.0",
"Node20_229_4": "1.244.1"
"Default": "1.247.0",
"Node20_229_4": "1.247.1"
}
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"loc.friendlyName": "[To be deprecated] Publish code coverage",
"loc.friendlyName": "Publish code coverage",
"loc.helpMarkDown": "[Learn more about this task](https://go.microsoft.com/fwlink/?LinkID=626485)",
"loc.description": "[DEPRECATION WARNING! Users are recommended to switch to version 2*.] Publish Cobertura or JaCoCo code coverage results from a build",
"loc.description": "Publish Cobertura or JaCoCo code coverage results from a build",
"loc.instanceNameFormat": "Publish code coverage from $(summaryFileLocation)",
"loc.input.label.codeCoverageTool": "Code coverage tool",
"loc.input.help.codeCoverageTool": "[DEPRECATION WARNING! Users are recommended to switch to task version 2*. For more details, see https://devblogs.microsoft.com/devops/new-pccr-task.] The tool with which code coverage results are generated.",
"loc.input.help.codeCoverageTool": "The tool with which code coverage results are generated.",
"loc.input.label.summaryFileLocation": "Summary file",
"loc.input.help.summaryFileLocation": "Path of the summary file containing code coverage statistics, such as line, method, and class coverage. The value may contain minimatch patterns. For example: `$(System.DefaultWorkingDirectory)/MyApp/**/site/cobertura/coverage.xml`",
"loc.input.label.pathToSources": "Path to Source files",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ async function run() {
try {
// Initialize localization
tl.setResourcePath(path.join(__dirname, 'task.json'));

// Log warning for PCCR V1 task deprecation
tl.warning(tl.loc('V1TaskDeprecationNotice'));


// Get input values
const codeCoverageTool = tl.getInput('codeCoverageTool', true);
const summaryFileLocation = tl.getInput('summaryFileLocation', true);
Expand Down
Loading

0 comments on commit 3cb05b7

Please sign in to comment.