Skip to content

Commit 3cb05b7

Browse files
authored
Removing the deprecation tag for PCCRV1 (#20549)
* Removing the deprecation tag for PCCRV1 * resolving erroers * resolving build error * nit changes * nit changes1
1 parent 1c963c1 commit 3cb05b7

File tree

13 files changed

+137
-146
lines changed

13 files changed

+137
-146
lines changed

Diff for: Tasks/PublishCodeCoverageResultsV1/Strings/resources.resjson/en-US/resources.resjson

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"loc.friendlyName": "[To be deprecated] Publish code coverage",
2+
"loc.friendlyName": "Publish code coverage",
33
"loc.helpMarkDown": "[Learn more about this task](https://go.microsoft.com/fwlink/?LinkID=626485)",
4-
"loc.description": "[DEPRECATION WARNING! Users are recommended to switch to version 2*.] Publish Cobertura or JaCoCo code coverage results from a build",
4+
"loc.description": "Publish Cobertura or JaCoCo code coverage results from a build",
55
"loc.instanceNameFormat": "Publish code coverage from $(summaryFileLocation)",
66
"loc.input.label.codeCoverageTool": "Code coverage tool",
77
"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.",

Diff for: Tasks/PublishCodeCoverageResultsV1/publishcodecoverageresults.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@ async function run() {
1010
try {
1111
// Initialize localization
1212
tl.setResourcePath(path.join(__dirname, 'task.json'));
13-
14-
// Log warning for PCCR V1 task deprecation
15-
tl.warning(tl.loc('V1TaskDeprecationNotice'));
16-
13+
1714
// Get input values
1815
const codeCoverageTool = tl.getInput('codeCoverageTool', true);
1916
const summaryFileLocation = tl.getInput('summaryFileLocation', true);

Diff for: Tasks/PublishCodeCoverageResultsV1/task.json

+105-105
Original file line numberDiff line numberDiff line change
@@ -1,107 +1,107 @@
11
{
2-
"id": "2A7EBC54-C13E-490E-81A5-D7561AB7CD97",
3-
"name": "PublishCodeCoverageResults",
4-
"friendlyName": "[To be deprecated] Publish code coverage",
5-
"description": "[DEPRECATION WARNING! Users are recommended to switch to version 2*.] Publish Cobertura or JaCoCo code coverage results from a build",
6-
"helpUrl": "https://docs.microsoft.com/azure/devops/pipelines/tasks/test/publish-code-coverage-results",
7-
"helpMarkDown": "[Learn more about this task](https://go.microsoft.com/fwlink/?LinkID=626485)",
8-
"category": "Test",
9-
"visibility": [
10-
"Build"
11-
],
12-
"runsOn": [
13-
"Agent",
14-
"DeploymentGroup"
15-
],
16-
"author": "Microsoft Corporation",
17-
"version": {
18-
"Major": 1,
19-
"Minor": 244,
20-
"Patch": 0
21-
},
22-
"demands": [],
23-
"minimumAgentVersion": "2.182.1",
24-
"instanceNameFormat": "Publish code coverage from $(summaryFileLocation)",
25-
"deprecated": true,
26-
"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",
27-
"inputs": [
28-
{
29-
"name": "codeCoverageTool",
30-
"type": "pickList",
31-
"label": "Code coverage tool",
32-
"required": true,
33-
"defaultValue": "JaCoCo",
34-
"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.",
35-
"options": {
36-
"Cobertura": "Cobertura",
37-
"JaCoCo": "JaCoCo"
38-
}
39-
},
40-
{
41-
"name": "summaryFileLocation",
42-
"type": "string",
43-
"label": "Summary file",
44-
"defaultValue": "",
45-
"required": true,
46-
"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`"
47-
},
48-
{
49-
"name": "pathToSources",
50-
"type": "string",
51-
"label": "Path to Source files",
52-
"defaultValue": "",
53-
"required": false,
54-
"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/`"
55-
},
56-
{
57-
"name": "reportDirectory",
58-
"type": "string",
59-
"label": "Report directory",
60-
"defaultValue": "",
61-
"required": false,
62-
"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`"
63-
},
64-
{
65-
"name": "additionalCodeCoverageFiles",
66-
"type": "string",
67-
"label": "Additional files",
68-
"defaultValue": "",
69-
"required": false,
70-
"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`"
71-
},
72-
{
73-
"name": "failIfCoverageEmpty",
74-
"type": "boolean",
75-
"label": "Fail when code coverage results are missing",
76-
"defaultValue": "false",
77-
"required": false,
78-
"helpMarkDown": "Fail the task if code coverage did not produce any results to publish."
79-
}
80-
],
81-
"execution": {
82-
"Node10": {
83-
"target": "publishcodecoverageresults.js",
84-
"argumentFormat": ""
85-
},
86-
"Node16": {
87-
"target": "publishcodecoverageresults.js",
88-
"argumentFormat": ""
89-
}
90-
},
91-
"restrictions": {
92-
"settableVariables": {
93-
"allowed": []
94-
}
95-
},
96-
"messages": {
97-
"FoundNMatchesForPattern": "Found %s result(s) matching pattern: %s",
98-
"MultipleSummaryFilesFound": "Multiple file or directory matches were found. Using the first match: %s",
99-
"NoCodeCoverage": "No code coverage results were found to publish.",
100-
"InstallDotNetCoreForHtmlReport": "Please install dotnet core to enable automatic generation of Html report.",
101-
"FailedToGenerateHtmlReport": "Failed to generate Html report. Error: %s",
102-
"IgnoringReportDirectory": "Ignoring coverage report directory with Html content as we are auto-generating Html content",
103-
"UpgradeAgentMessage": "Please upgrade your agent version. https://github.com/Microsoft/vsts-agent/releases",
104-
"GeneratedHtmlReport": "Generated code coverage html report: %s",
105-
"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."
106-
}
2+
"id": "2A7EBC54-C13E-490E-81A5-D7561AB7CD97",
3+
"name": "PublishCodeCoverageResults",
4+
"friendlyName": "Publish code coverage",
5+
"description": "Publish Cobertura or JaCoCo code coverage results from a build",
6+
"helpUrl": "https://docs.microsoft.com/azure/devops/pipelines/tasks/test/publish-code-coverage-results",
7+
"helpMarkDown": "[Learn more about this task](https://go.microsoft.com/fwlink/?LinkID=626485)",
8+
"category": "Test",
9+
"visibility": [
10+
"Build"
11+
],
12+
"runsOn": [
13+
"Agent",
14+
"DeploymentGroup"
15+
],
16+
"author": "Microsoft Corporation",
17+
"version": {
18+
"Major": 1,
19+
"Minor": 247,
20+
"Patch": 0
21+
},
22+
"demands": [],
23+
"minimumAgentVersion": "2.182.1",
24+
"instanceNameFormat": "Publish code coverage from $(summaryFileLocation)",
25+
"deprecated": true,
26+
"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",
27+
"inputs": [
28+
{
29+
"name": "codeCoverageTool",
30+
"type": "pickList",
31+
"label": "Code coverage tool",
32+
"required": true,
33+
"defaultValue": "JaCoCo",
34+
"helpMarkDown": "The tool with which code coverage results are generated.",
35+
"options": {
36+
"Cobertura": "Cobertura",
37+
"JaCoCo": "JaCoCo"
38+
}
39+
},
40+
{
41+
"name": "summaryFileLocation",
42+
"type": "string",
43+
"label": "Summary file",
44+
"defaultValue": "",
45+
"required": true,
46+
"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`"
47+
},
48+
{
49+
"name": "pathToSources",
50+
"type": "string",
51+
"label": "Path to Source files",
52+
"defaultValue": "",
53+
"required": false,
54+
"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/`"
55+
},
56+
{
57+
"name": "reportDirectory",
58+
"type": "string",
59+
"label": "Report directory",
60+
"defaultValue": "",
61+
"required": false,
62+
"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`"
63+
},
64+
{
65+
"name": "additionalCodeCoverageFiles",
66+
"type": "string",
67+
"label": "Additional files",
68+
"defaultValue": "",
69+
"required": false,
70+
"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`"
71+
},
72+
{
73+
"name": "failIfCoverageEmpty",
74+
"type": "boolean",
75+
"label": "Fail when code coverage results are missing",
76+
"defaultValue": "false",
77+
"required": false,
78+
"helpMarkDown": "Fail the task if code coverage did not produce any results to publish."
79+
}
80+
],
81+
"execution": {
82+
"Node10": {
83+
"target": "publishcodecoverageresults.js",
84+
"argumentFormat": ""
85+
},
86+
"Node16": {
87+
"target": "publishcodecoverageresults.js",
88+
"argumentFormat": ""
89+
}
90+
},
91+
"restrictions": {
92+
"settableVariables": {
93+
"allowed": []
94+
}
95+
},
96+
"messages": {
97+
"FoundNMatchesForPattern": "Found %s result(s) matching pattern: %s",
98+
"MultipleSummaryFilesFound": "Multiple file or directory matches were found. Using the first match: %s",
99+
"NoCodeCoverage": "No code coverage results were found to publish.",
100+
"InstallDotNetCoreForHtmlReport": "Please install dotnet core to enable automatic generation of Html report.",
101+
"FailedToGenerateHtmlReport": "Failed to generate Html report. Error: %s",
102+
"IgnoringReportDirectory": "Ignoring coverage report directory with Html content as we are auto-generating Html content",
103+
"UpgradeAgentMessage": "Please upgrade your agent version. https://github.com/Microsoft/vsts-agent/releases",
104+
"GeneratedHtmlReport": "Generated code coverage html report: %s",
105+
"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."
106+
}
107107
}

Diff for: Tasks/PublishCodeCoverageResultsV1/task.loc.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"author": "Microsoft Corporation",
1717
"version": {
1818
"Major": 1,
19-
"Minor": 244,
19+
"Minor": 247,
2020
"Patch": 0
2121
},
2222
"demands": [],
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Default|1.244.0
2-
Node20_229_4|1.244.1
1+
Default|1.247.0
2+
Node20_229_4|1.247.1

Diff for: _generated/PublishCodeCoverageResultsV1/Strings/resources.resjson/en-US/resources.resjson

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
2-
"loc.friendlyName": "[To be deprecated] Publish code coverage",
2+
"loc.friendlyName": "Publish code coverage",
33
"loc.helpMarkDown": "[Learn more about this task](https://go.microsoft.com/fwlink/?LinkID=626485)",
4-
"loc.description": "[DEPRECATION WARNING! Users are recommended to switch to version 2*.] Publish Cobertura or JaCoCo code coverage results from a build",
4+
"loc.description": "Publish Cobertura or JaCoCo code coverage results from a build",
55
"loc.instanceNameFormat": "Publish code coverage from $(summaryFileLocation)",
66
"loc.input.label.codeCoverageTool": "Code coverage tool",
7-
"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.",
7+
"loc.input.help.codeCoverageTool": "The tool with which code coverage results are generated.",
88
"loc.input.label.summaryFileLocation": "Summary file",
99
"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`",
1010
"loc.input.label.pathToSources": "Path to Source files",

Diff for: _generated/PublishCodeCoverageResultsV1/publishcodecoverageresults.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@ async function run() {
1010
try {
1111
// Initialize localization
1212
tl.setResourcePath(path.join(__dirname, 'task.json'));
13-
14-
// Log warning for PCCR V1 task deprecation
15-
tl.warning(tl.loc('V1TaskDeprecationNotice'));
16-
13+
1714
// Get input values
1815
const codeCoverageTool = tl.getInput('codeCoverageTool', true);
1916
const summaryFileLocation = tl.getInput('summaryFileLocation', true);

Diff for: _generated/PublishCodeCoverageResultsV1/task.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"id": "2A7EBC54-C13E-490E-81A5-D7561AB7CD97",
33
"name": "PublishCodeCoverageResults",
4-
"friendlyName": "[To be deprecated] Publish code coverage",
5-
"description": "[DEPRECATION WARNING! Users are recommended to switch to version 2*.] Publish Cobertura or JaCoCo code coverage results from a build",
4+
"friendlyName": "Publish code coverage",
5+
"description": "Publish Cobertura or JaCoCo code coverage results from a build",
66
"helpUrl": "https://docs.microsoft.com/azure/devops/pipelines/tasks/test/publish-code-coverage-results",
77
"helpMarkDown": "[Learn more about this task](https://go.microsoft.com/fwlink/?LinkID=626485)",
88
"category": "Test",
@@ -16,7 +16,7 @@
1616
"author": "Microsoft Corporation",
1717
"version": {
1818
"Major": 1,
19-
"Minor": 244,
19+
"Minor": 247,
2020
"Patch": 0
2121
},
2222
"demands": [],
@@ -31,7 +31,7 @@
3131
"label": "Code coverage tool",
3232
"required": true,
3333
"defaultValue": "JaCoCo",
34-
"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.",
34+
"helpMarkDown": "The tool with which code coverage results are generated.",
3535
"options": {
3636
"Cobertura": "Cobertura",
3737
"JaCoCo": "JaCoCo"
@@ -105,7 +105,7 @@
105105
"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."
106106
},
107107
"_buildConfigMapping": {
108-
"Default": "1.244.0",
109-
"Node20_229_4": "1.244.1"
108+
"Default": "1.247.0",
109+
"Node20_229_4": "1.247.1"
110110
}
111111
}

Diff for: _generated/PublishCodeCoverageResultsV1/task.loc.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"author": "Microsoft Corporation",
1717
"version": {
1818
"Major": 1,
19-
"Minor": 244,
19+
"Minor": 247,
2020
"Patch": 0
2121
},
2222
"demands": [],
@@ -105,7 +105,7 @@
105105
"V1TaskDeprecationNotice": "ms-resource:loc.messages.V1TaskDeprecationNotice"
106106
},
107107
"_buildConfigMapping": {
108-
"Default": "1.244.0",
109-
"Node20_229_4": "1.244.1"
108+
"Default": "1.247.0",
109+
"Node20_229_4": "1.247.1"
110110
}
111111
}

Diff for: _generated/PublishCodeCoverageResultsV1_Node20/Strings/resources.resjson/en-US/resources.resjson

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
2-
"loc.friendlyName": "[To be deprecated] Publish code coverage",
2+
"loc.friendlyName": "Publish code coverage",
33
"loc.helpMarkDown": "[Learn more about this task](https://go.microsoft.com/fwlink/?LinkID=626485)",
4-
"loc.description": "[DEPRECATION WARNING! Users are recommended to switch to version 2*.] Publish Cobertura or JaCoCo code coverage results from a build",
4+
"loc.description": "Publish Cobertura or JaCoCo code coverage results from a build",
55
"loc.instanceNameFormat": "Publish code coverage from $(summaryFileLocation)",
66
"loc.input.label.codeCoverageTool": "Code coverage tool",
7-
"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.",
7+
"loc.input.help.codeCoverageTool": "The tool with which code coverage results are generated.",
88
"loc.input.label.summaryFileLocation": "Summary file",
99
"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`",
1010
"loc.input.label.pathToSources": "Path to Source files",

Diff for: _generated/PublishCodeCoverageResultsV1_Node20/publishcodecoverageresults.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@ async function run() {
1010
try {
1111
// Initialize localization
1212
tl.setResourcePath(path.join(__dirname, 'task.json'));
13-
14-
// Log warning for PCCR V1 task deprecation
15-
tl.warning(tl.loc('V1TaskDeprecationNotice'));
16-
13+
1714
// Get input values
1815
const codeCoverageTool = tl.getInput('codeCoverageTool', true);
1916
const summaryFileLocation = tl.getInput('summaryFileLocation', true);

0 commit comments

Comments
 (0)