diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 7384b79f..cdb57d06 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -12,7 +12,7 @@ variables: - name: disable.coverage.autogenerate value: 'true' - name: version - value: '4.6.3' + value: '4.6.4' stages: - stage: Build diff --git a/src/AzureDevopsTask/README.md b/src/AzureDevopsTask/README.md index fd2bf852..606c724d 100644 --- a/src/AzureDevopsTask/README.md +++ b/src/AzureDevopsTask/README.md @@ -10,6 +10,27 @@ To learn how to use *ReportGenerator* have a look at the: * [Usage Guide](https://danielpalme.github.io/ReportGenerator/usage.html) * [Command line parameters](https://github.com/danielpalme/ReportGenerator/#usage--command-line-parameters) +### YAML example +```yaml + +- task: Palmmedia.reportgenerator.reportgenerator-build-release-task. - task: Palmmedia.reportgenerator.reportgenerator-build-release-task.reportgenerator@4 + displayName: ReportGenerator + inputs: + reports: 'coverage.xml' # REQUIRED # The coverage reports that should be parsed (separated by semicolon). Globbing is supported. + targetdir: 'coveragereport' # REQUIRED # The directory where the generated report should be saved. + 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 + 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. + historydir: '' # Optional directory for storing persistent coverage information. Can be used in future reports to show coverage evolution. + plugins: '' # Optional plugin files for custom reports or custom history storage (separated by semicolon). + assemblyfilters: '+*' # Optional list of assemblies that should be included or excluded in the report. Exclusion filters take precedence over inclusion filters. Wildcards are allowed. + classfilters: '+*' # Optional list of classes that should be included or excluded in the report. Exclusion filters take precedence over inclusion filters. Wildcards are allowed. + filefilters: '+*' # Optional list of files that should be included or excluded in the report. Exclusion filters take precedence over inclusion filters. Wildcards are allowed. + verbosity: 'Info' # The verbosity level of the log messages. Values: Verbose, Info, Warning, Error, Off + title: '' # Optional title. + tag: '$(build.buildnumber)_#$(build.buildid)' # Optional tag or build version. + customSettings: '' # Optional custom settings (separated by semicolon). See: https://github.com/danielpalme/ReportGenerator/wiki/Settings. +``` + ### Attention 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_. To disable the regeneration of the report, you can use the following environment variable in your build: diff --git a/src/AzureDevopsTask/ReportGenerator/reportgenerator.ts b/src/AzureDevopsTask/ReportGenerator/reportgenerator.ts index c4cdc68d..e4058bab 100644 --- a/src/AzureDevopsTask/ReportGenerator/reportgenerator.ts +++ b/src/AzureDevopsTask/ReportGenerator/reportgenerator.ts @@ -17,6 +17,14 @@ async function executeReportGenerator(): Promise { .arg('-title:' + (tl.getInput('title') || '')) .arg('-tag:' + (tl.getInput('tag') || '')); + const customSettings = (tl.getInput('customSettings') || ''); + + if (customSettings.length > 0) { + customSettings.split(';').forEach(setting => { + tool = tool.arg(setting.trim()); + }); + } + return await tool.exec(); } diff --git a/src/AzureDevopsTask/ReportGenerator/task.json b/src/AzureDevopsTask/ReportGenerator/task.json index 543fcc78..6828b36d 100644 --- a/src/AzureDevopsTask/ReportGenerator/task.json +++ b/src/AzureDevopsTask/ReportGenerator/task.json @@ -13,7 +13,7 @@ "version": { "Major": 4, "Minor": 6, - "Patch": 3 + "Patch": 4 }, "instanceNameFormat": "ReportGenerator", "groups": [ @@ -121,6 +121,14 @@ "defaultValue": "$(build.buildnumber)_#$(build.buildid)", "required": false, "helpMarkDown": "Optional tag or build version." + }, + { + "name": "customSettings", + "type": "string", + "label": "Custom settings", + "defaultValue": "", + "required": false, + "helpMarkDown": "Custom settings (separated by semicolon). See: https://github.com/danielpalme/ReportGenerator/wiki/Settings" } ], "execution": { diff --git a/src/AzureDevopsTask/vss-extension.json b/src/AzureDevopsTask/vss-extension.json index 85d625cf..ff4be3de 100644 --- a/src/AzureDevopsTask/vss-extension.json +++ b/src/AzureDevopsTask/vss-extension.json @@ -2,7 +2,7 @@ "manifestVersion": 1, "id": "reportgenerator", "name": "ReportGenerator", - "version": "4.6.3", + "version": "4.6.4", "publisher": "Palmmedia", "public": true, "targets": [ diff --git a/src/Readme.txt b/src/Readme.txt index 8dee1483..2b47f2ba 100644 --- a/src/Readme.txt +++ b/src/Readme.txt @@ -63,6 +63,10 @@ For further details take a look at LICENSE.txt. CHANGELOG +4.6.4.0 + + * New: #366: Added custom settings to Azure DevOps task + 4.6.3.0 * New: #364: Added tooltips to show coverage as ratio diff --git a/src/ReportGenerator.Console.NetCore/ReportGenerator.Console.NetCore.csproj b/src/ReportGenerator.Console.NetCore/ReportGenerator.Console.NetCore.csproj index a4a90d0e..eb18c7e7 100644 --- a/src/ReportGenerator.Console.NetCore/ReportGenerator.Console.NetCore.csproj +++ b/src/ReportGenerator.Console.NetCore/ReportGenerator.Console.NetCore.csproj @@ -7,8 +7,8 @@ ReportGenerator Palmmedia.ReportGenerator Palmmedia.ReportGenerator.Console.NetCore.Program - 4.6.3.0 - 4.6.3.0 + 4.6.4.0 + 4.6.4.0 diff --git a/src/ReportGenerator.Console/Properties/AssemblyInfo.cs b/src/ReportGenerator.Console/Properties/AssemblyInfo.cs index b8cf1959..f764be2b 100644 --- a/src/ReportGenerator.Console/Properties/AssemblyInfo.cs +++ b/src/ReportGenerator.Console/Properties/AssemblyInfo.cs @@ -31,5 +31,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("4.6.3.0")] -[assembly: AssemblyFileVersion("4.6.3.0")] +[assembly: AssemblyVersion("4.6.4.0")] +[assembly: AssemblyFileVersion("4.6.4.0")] diff --git a/src/ReportGenerator.Core.Test/ReportGenerator.Core.Test.csproj b/src/ReportGenerator.Core.Test/ReportGenerator.Core.Test.csproj index 211e0643..0419e87f 100644 --- a/src/ReportGenerator.Core.Test/ReportGenerator.Core.Test.csproj +++ b/src/ReportGenerator.Core.Test/ReportGenerator.Core.Test.csproj @@ -4,8 +4,8 @@ netcoreapp3.1 false Palmmedia.ReportGenerator.Core.Test - 4.6.3.0 - 4.6.3.0 + 4.6.4.0 + 4.6.4.0 diff --git a/src/ReportGenerator.Core/ReportGenerator.Core.csproj b/src/ReportGenerator.Core/ReportGenerator.Core.csproj index 9da7ffc1..878b92f2 100644 --- a/src/ReportGenerator.Core/ReportGenerator.Core.csproj +++ b/src/ReportGenerator.Core/ReportGenerator.Core.csproj @@ -7,8 +7,8 @@ false true ReportGenerator.Core - 4.6.3.0 - 4.6.3.0 + 4.6.4.0 + 4.6.4.0 diff --git a/src/ReportGenerator.DotnetCliTool/ReportGenerator.DotnetCliTool.csproj b/src/ReportGenerator.DotnetCliTool/ReportGenerator.DotnetCliTool.csproj index 50f32b51..58bd8241 100644 --- a/src/ReportGenerator.DotnetCliTool/ReportGenerator.DotnetCliTool.csproj +++ b/src/ReportGenerator.DotnetCliTool/ReportGenerator.DotnetCliTool.csproj @@ -7,8 +7,8 @@ dotnet-reportgenerator Palmmedia.ReportGenerator Palmmedia.ReportGenerator.DotnetCliTool.Program - 4.6.3.0 - 4.6.3.0 + 4.6.4.0 + 4.6.4.0 diff --git a/src/ReportGenerator.DotnetCorePluginLoader/ReportGenerator.DotnetCorePluginLoader.csproj b/src/ReportGenerator.DotnetCorePluginLoader/ReportGenerator.DotnetCorePluginLoader.csproj index 9656ee52..ba602c93 100644 --- a/src/ReportGenerator.DotnetCorePluginLoader/ReportGenerator.DotnetCorePluginLoader.csproj +++ b/src/ReportGenerator.DotnetCorePluginLoader/ReportGenerator.DotnetCorePluginLoader.csproj @@ -2,8 +2,8 @@ netcoreapp2.0 ReportGenerator.DotnetCorePluginLoader - 4.6.3.0 - 4.6.3.0 + 4.6.4.0 + 4.6.4.0 diff --git a/src/ReportGenerator.DotnetGlobalTool/ReportGenerator.DotnetGlobalTool.csproj b/src/ReportGenerator.DotnetGlobalTool/ReportGenerator.DotnetGlobalTool.csproj index df6570ff..9b307621 100644 --- a/src/ReportGenerator.DotnetGlobalTool/ReportGenerator.DotnetGlobalTool.csproj +++ b/src/ReportGenerator.DotnetGlobalTool/ReportGenerator.DotnetGlobalTool.csproj @@ -7,8 +7,8 @@ ReportGenerator Palmmedia.ReportGenerator Palmmedia.ReportGenerator.DotnetGlobalTool.Program - 4.6.3.0 - 4.6.3.0 + 4.6.4.0 + 4.6.4.0 diff --git a/src/ReportGenerator.MSBuild/ReportGenerator.MSBuild.csproj b/src/ReportGenerator.MSBuild/ReportGenerator.MSBuild.csproj index 898919f1..3c57bb3a 100644 --- a/src/ReportGenerator.MSBuild/ReportGenerator.MSBuild.csproj +++ b/src/ReportGenerator.MSBuild/ReportGenerator.MSBuild.csproj @@ -5,8 +5,8 @@ Palmmedia.ReportGenerator.MSBuild false true - 4.6.3.0 - 4.6.3.0 + 4.6.4.0 + 4.6.4.0 diff --git a/src/build.proj b/src/build.proj index b265ce1e..2b7fa8bb 100644 --- a/src/build.proj +++ b/src/build.proj @@ -22,7 +22,7 @@ - 4.6.3 + 4.6.4