Skip to content

Commit 0529ec6

Browse files
committed
#366: Added custom settings to Azure DevOps task
1 parent 170172b commit 0529ec6

File tree

15 files changed

+61
-20
lines changed

15 files changed

+61
-20
lines changed

azure-pipelines.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ variables:
1212
- name: disable.coverage.autogenerate
1313
value: 'true'
1414
- name: version
15-
value: '4.6.3'
15+
value: '4.6.4'
1616

1717
stages:
1818
- stage: Build

src/AzureDevopsTask/README.md

+21
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,27 @@ To learn how to use *ReportGenerator* have a look at the:
1010
* [Usage Guide](https://danielpalme.github.io/ReportGenerator/usage.html)
1111
* [Command line parameters](https://github.com/danielpalme/ReportGenerator/#usage--command-line-parameters)
1212

13+
### YAML example
14+
```yaml
15+
16+
- task: Palmmedia.reportgenerator.reportgenerator-build-release-task. - task: Palmmedia.reportgenerator.reportgenerator-build-release-task.reportgenerator@4
17+
displayName: ReportGenerator
18+
inputs:
19+
reports: 'coverage.xml' # REQUIRED # The coverage reports that should be parsed (separated by semicolon). Globbing is supported.
20+
targetdir: 'coveragereport' # REQUIRED # The directory where the generated report should be saved.
21+
reporttypes: 'HtmlInline_AzurePipelines;Cobertura' # The output formats and scope (separated by semicolon) Values: Badges, Clover, Cobertura, CsvSummary, Html, HtmlChart, HtmlInline, HtmlInline_AzurePipelines, HtmlInline_AzurePipelines_Dark, HtmlSummary, JsonSummary, Latex, LatexSummary, lcov, MHtml, PngChart, SonarQube, TeamCitySummary, TextSummary, Xml, XmlSummary
22+
sourcedirs: '' # Optional directories which contain the corresponding source code (separated by semicolon). The source directories are used if coverage report contains classes without path information.
23+
historydir: '' # Optional directory for storing persistent coverage information. Can be used in future reports to show coverage evolution.
24+
plugins: '' # Optional plugin files for custom reports or custom history storage (separated by semicolon).
25+
assemblyfilters: '+*' # Optional list of assemblies that should be included or excluded in the report. Exclusion filters take precedence over inclusion filters. Wildcards are allowed.
26+
classfilters: '+*' # Optional list of classes that should be included or excluded in the report. Exclusion filters take precedence over inclusion filters. Wildcards are allowed.
27+
filefilters: '+*' # Optional list of files that should be included or excluded in the report. Exclusion filters take precedence over inclusion filters. Wildcards are allowed.
28+
verbosity: 'Info' # The verbosity level of the log messages. Values: Verbose, Info, Warning, Error, Off
29+
title: '' # Optional title.
30+
tag: '$(build.buildnumber)_#$(build.buildid)' # Optional tag or build version.
31+
customSettings: '' # Optional custom settings (separated by semicolon). See: https://github.com/danielpalme/ReportGenerator/wiki/Settings.
32+
```
33+
1334
### Attention
1435
The [Publish Code Coverage Results](https://github.com/microsoft/azure-pipelines-tasks/tree/master/Tasks/PublishCodeCoverageResultsV1) task from Microsoft regenerates the report with different settings and based on the supplied _Coberatura_ file (see [announcement](https://docs.microsoft.com/en-us/azure/devops/release-notes/2019/sprint-150-update#cobertura-code-coverage-report-updates)). Moreover it does not necessarily use the latest version of _ReportGenerator_.
1536
To disable the regeneration of the report, you can use the following environment variable in your build:

src/AzureDevopsTask/ReportGenerator/reportgenerator.ts

+8
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@ async function executeReportGenerator(): Promise<number> {
1717
.arg('-title:' + (tl.getInput('title') || ''))
1818
.arg('-tag:' + (tl.getInput('tag') || ''));
1919

20+
const customSettings = (tl.getInput('customSettings') || '');
21+
22+
if (customSettings.length > 0) {
23+
customSettings.split(';').forEach(setting => {
24+
tool = tool.arg(setting.trim());
25+
});
26+
}
27+
2028
return await tool.exec();
2129
}
2230

src/AzureDevopsTask/ReportGenerator/task.json

+9-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"version": {
1414
"Major": 4,
1515
"Minor": 6,
16-
"Patch": 3
16+
"Patch": 4
1717
},
1818
"instanceNameFormat": "ReportGenerator",
1919
"groups": [
@@ -121,6 +121,14 @@
121121
"defaultValue": "$(build.buildnumber)_#$(build.buildid)",
122122
"required": false,
123123
"helpMarkDown": "Optional tag or build version."
124+
},
125+
{
126+
"name": "customSettings",
127+
"type": "string",
128+
"label": "Custom settings",
129+
"defaultValue": "",
130+
"required": false,
131+
"helpMarkDown": "Custom settings (separated by semicolon). See: https://github.com/danielpalme/ReportGenerator/wiki/Settings"
124132
}
125133
],
126134
"execution": {

src/AzureDevopsTask/vss-extension.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"manifestVersion": 1,
33
"id": "reportgenerator",
44
"name": "ReportGenerator",
5-
"version": "4.6.3",
5+
"version": "4.6.4",
66
"publisher": "Palmmedia",
77
"public": true,
88
"targets": [

src/Readme.txt

+4
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ For further details take a look at LICENSE.txt.
6363

6464
CHANGELOG
6565

66+
4.6.4.0
67+
68+
* New: #366: Added custom settings to Azure DevOps task
69+
6670
4.6.3.0
6771

6872
* New: #364: Added tooltips to show coverage as ratio

src/ReportGenerator.Console.NetCore/ReportGenerator.Console.NetCore.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
<AssemblyName>ReportGenerator</AssemblyName>
88
<RootNamespace>Palmmedia.ReportGenerator</RootNamespace>
99
<StartupObject>Palmmedia.ReportGenerator.Console.NetCore.Program</StartupObject>
10-
<AssemblyVersion>4.6.3.0</AssemblyVersion>
11-
<FileVersion>4.6.3.0</FileVersion>
10+
<AssemblyVersion>4.6.4.0</AssemblyVersion>
11+
<FileVersion>4.6.4.0</FileVersion>
1212
</PropertyGroup>
1313

1414
<ItemGroup>

src/ReportGenerator.Console/Properties/AssemblyInfo.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@
3131
// You can specify all the values or you can default the Build and Revision Numbers
3232
// by using the '*' as shown below:
3333
// [assembly: AssemblyVersion("1.0.*")]
34-
[assembly: AssemblyVersion("4.6.3.0")]
35-
[assembly: AssemblyFileVersion("4.6.3.0")]
34+
[assembly: AssemblyVersion("4.6.4.0")]
35+
[assembly: AssemblyFileVersion("4.6.4.0")]

src/ReportGenerator.Core.Test/ReportGenerator.Core.Test.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
<TargetFramework>netcoreapp3.1</TargetFramework>
55
<IsPackable>false</IsPackable>
66
<RootNamespace>Palmmedia.ReportGenerator.Core.Test</RootNamespace>
7-
<AssemblyVersion>4.6.3.0</AssemblyVersion>
8-
<FileVersion>4.6.3.0</FileVersion>
7+
<AssemblyVersion>4.6.4.0</AssemblyVersion>
8+
<FileVersion>4.6.4.0</FileVersion>
99
</PropertyGroup>
1010

1111
<ItemGroup>

src/ReportGenerator.Core/ReportGenerator.Core.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
88
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
99
<AssemblyName>ReportGenerator.Core</AssemblyName>
10-
<AssemblyVersion>4.6.3.0</AssemblyVersion>
11-
<FileVersion>4.6.3.0</FileVersion>
10+
<AssemblyVersion>4.6.4.0</AssemblyVersion>
11+
<FileVersion>4.6.4.0</FileVersion>
1212
</PropertyGroup>
1313

1414
<PropertyGroup>

src/ReportGenerator.DotnetCliTool/ReportGenerator.DotnetCliTool.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
<AssemblyName>dotnet-reportgenerator</AssemblyName>
88
<RootNamespace>Palmmedia.ReportGenerator</RootNamespace>
99
<StartupObject>Palmmedia.ReportGenerator.DotnetCliTool.Program</StartupObject>
10-
<AssemblyVersion>4.6.3.0</AssemblyVersion>
11-
<FileVersion>4.6.3.0</FileVersion>
10+
<AssemblyVersion>4.6.4.0</AssemblyVersion>
11+
<FileVersion>4.6.4.0</FileVersion>
1212
</PropertyGroup>
1313

1414
<ItemGroup>

src/ReportGenerator.DotnetCorePluginLoader/ReportGenerator.DotnetCorePluginLoader.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<PropertyGroup>
33
<TargetFramework>netcoreapp2.0</TargetFramework>
44
<RootNamespace>ReportGenerator.DotnetCorePluginLoader</RootNamespace>
5-
<AssemblyVersion>4.6.3.0</AssemblyVersion>
6-
<FileVersion>4.6.3.0</FileVersion>
5+
<AssemblyVersion>4.6.4.0</AssemblyVersion>
6+
<FileVersion>4.6.4.0</FileVersion>
77
</PropertyGroup>
88

99
<ItemGroup>

src/ReportGenerator.DotnetGlobalTool/ReportGenerator.DotnetGlobalTool.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
<AssemblyName>ReportGenerator</AssemblyName>
88
<RootNamespace>Palmmedia.ReportGenerator</RootNamespace>
99
<StartupObject>Palmmedia.ReportGenerator.DotnetGlobalTool.Program</StartupObject>
10-
<AssemblyVersion>4.6.3.0</AssemblyVersion>
11-
<FileVersion>4.6.3.0</FileVersion>
10+
<AssemblyVersion>4.6.4.0</AssemblyVersion>
11+
<FileVersion>4.6.4.0</FileVersion>
1212
</PropertyGroup>
1313

1414
<ItemGroup>

src/ReportGenerator.MSBuild/ReportGenerator.MSBuild.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
<RootNamespace>Palmmedia.ReportGenerator.MSBuild</RootNamespace>
66
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
77
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
8-
<AssemblyVersion>4.6.3.0</AssemblyVersion>
9-
<FileVersion>4.6.3.0</FileVersion>
8+
<AssemblyVersion>4.6.4.0</AssemblyVersion>
9+
<FileVersion>4.6.4.0</FileVersion>
1010
</PropertyGroup>
1111

1212
<ItemGroup>

src/build.proj

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
<!-- Version, adjust before build -->
2424
<PropertyGroup>
25-
<Version>4.6.3</Version>
25+
<Version>4.6.4</Version>
2626
</PropertyGroup>
2727

2828
<!-- Tools -->

0 commit comments

Comments
 (0)