Skip to content

Commit

Permalink
Add recipe documentation (#819)
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalberger authored Dec 18, 2024
1 parent 62073f3 commit b9cbeff
Show file tree
Hide file tree
Showing 9 changed files with 455 additions and 0 deletions.
90 changes: 90 additions & 0 deletions docs/input/docs/recipe/configuration.md

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions docs/input/docs/recipe/demos.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
Order: 40
Title: Demos
Description: Demo setups for Cake.Issues recipes.
---

There are demo setups available for different combinations of build servers and repositories which you can fork and to which you can create pull requests
to test the recipe functionality.

| Recipe | Build Server | Repository |
|--------------------|-------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------|
| Cake.Issues.Recipe | [Azure Pipelines](https://dev.azure.com/pberger/Cake.Issues.Recipe-Demo/_build/latest?definitionId=6) | [Azure Repos](https://dev.azure.com/pberger/_git/Cake.Issues.Recipe-Demo) |
7 changes: 7 additions & 0 deletions docs/input/docs/recipe/index.cshtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
Order: 40
Description: Using Cake.Issues addins with a pre-made recipe script.
---
<p>@Html.Raw(Model.String(DocsKeys.Description))</p>

@Html.Partial("_ChildPages")
78 changes: 78 additions & 0 deletions docs/input/docs/recipe/overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
---
Order: 10
Title: Overview
Description: Overview about Cake.Issues recipes.
---
Cake.Issues recipes provide build scripts, delivered as a NuGet package, which can be used inside your projects Cake build to add issue management.

Integration of code analyzing and linting tools into a build pipeline often looks the similar, and differentiates mainly on the used linters, build and pull request systems.
Cake.Issues recipes contain code to do all the parsing, integration with build and pull request systems for you, using the individual Cake.Issues addins.
They support different linters based on the linting log files you pass it and integrate automatically with different build and pull request systems.

There are two flavors available:

* [Cake.Issues.Recipe]: For [Cake .NET Tool], [Cake runner for .NET Framework] or [Cake runner for .NET Core]
* [Cake.Frosting.Issues.Recipe]: For [Cake Frosting]

# Supported tools

See [supported tools] for a list of supported linters, build servers and pull request systems.

# Bundled addins

Cake.Issues recipes will add the following addins to your build:

| Addin Cake.Issues.Recipe | Addin.Frosting.Issues.Recipe | Remarks |
|---------------------------------------------------------|------------------------------------------------------------------|-|
| [Cake.Git] 5.0.1 | [Cake.Frosting.Git] 5.0.1 | Only used if `RepositoryInfoProvider` type is set to `RepositoryInfoProviderType.CakeGit`. See [Git repository information configuration] for details. |
| [Cake.Issues] 5.0.1 | [Cake.Issues] 5.0.1 | |
| [Cake.Issues.MsBuild] 5.0.1 | [Cake.Frosting.Issues.MsBuild] 5.0.1 | |
| [Cake.Issues.InspectCode] 5.0.1 | [Cake.Frosting.Issues.InspectCode] 5.0.1 | |
| [Cake.Issues.Markdownlint] 5.0.1 | [Cake.Frosting.Issues.Markdownlint] 5.0.1 | |
| [Cake.Issues.EsLint] 5.0.1 | [Cake.Frosting.Issues.EsLint] 5.0.1 | |
| [Cake.Issues.Sarif] 5.0.1 | [Cake.Frosting.Issues.Sarif] 5.0.1 | |
| [Cake.Issues.Reporting] 5.0.1 | [Cake.Frosting.Issues.Reporting] 5.0.1 | |
| [Cake.Issues.Reporting.Generic] 5.0.1 | [Cake.Frosting.Issues.Reporting.Generic] 5.0.1 | |
| [Cake.Issues.Reporting.Sarif] 5.0.1 | [Cake.Frosting.Issues.Reporting.Sarif] 5.0.1 | |
| [Cake.Issues.PullRequests] 5.0.1 | [Cake.Frosting.Issues.PullRequests] 5.0.1 | |
| [Cake.Issues.PullRequests.AppVeyor] 5.0.1 | [Cake.Frosting.Issues.PullRequests.AppVeyor] 5.0.1 | |
| [Cake.Issues.PullRequests.AzureDevOps] 5.0.1 | [Cake.Frosting.Issues.PullRequests.AzureDevOps] 5.0.1 | |
| [Cake.Issues.PullRequests.GitHubActions] 5.0.1 | [Cake.Frosting.Issues.PullRequests.GitHubActions] 5.0.1 | |
| [Cake.AzureDevOps] 5.0.0 | [Cake.AzureDevOps] 5.0.0 | |

[Cake.Issues.Recipe]: https://www.nuget.org/packages/Cake.Issues.Recipe
[Cake.Frosting.Issues.Recipe]: https://www.nuget.org/packages/Cake.Frosting.Issues.Recipe
[Cake .NET Tool]: https://cakebuild.net/docs/running-builds/runners/dotnet-tool
[Cake runner for .NET Framework]: https://cakebuild.net/docs/running-builds/runners/cake-runner-for-dotnet-framework
[Cake runner for .NET Core]: https://cakebuild.net/docs/running-builds/runners/cake-runner-for-dotnet-core
[Cake Frosting]: https://cakebuild.net/docs/running-builds/runners/cake-frosting
[supported tools]: supported-tools
[Git repository information configuration]: /docs/recipe/configuration#git-repository-information
[Cake.Git]: https://cakebuild.net/extensions/cake-git/
[Cake.Frosting.Git]: https://cakebuild.net/extensions/cake-git/
[Cake.Issues]: https://cakebuild.net/extensions/cake-issues/
[Cake.Issues.MsBuild]: https://cakebuild.net/extensions/cake-issues-msbuild/
[Cake.Frosting.Issues.MsBuild]: https://cakebuild.net/extensions/cake-issues-msbuild/
[Cake.Issues.InspectCode]: https://cakebuild.net/extensions/cake-issues-inspectcode/
[Cake.Frosting.Issues.InspectCode]: https://cakebuild.net/extensions/cake-issues-inspectcode/
[Cake.Issues.Markdownlint]: https://cakebuild.net/extensions/cake-issues-markdownlint/
[Cake.Frosting.Issues.Markdownlint]: https://cakebuild.net/extensions/cake-issues-markdownlint/
[Cake.Issues.EsLint]: https://cakebuild.net/extensions/cake-issues-eslint/
[Cake.Frosting.Issues.EsLint]: https://cakebuild.net/extensions/cake-issues-eslint/
[Cake.Issues.Sarif]: https://cakebuild.net/extensions/cake-issues-sarif/
[Cake.Frosting.Issues.Sarif]: https://cakebuild.net/extensions/cake-issues-sarif/
[Cake.Issues.Reporting]: https://cakebuild.net/extensions/cake-issues-reporting/
[Cake.Frosting.Issues.Reporting]: https://cakebuild.net/extensions/cake-issues-reporting/
[Cake.Issues.Reporting.Generic]: https://cakebuild.net/extensions/cake-issues-reporting-generic/
[Cake.Frosting.Issues.Reporting.Generic]: https://cakebuild.net/extensions/cake-issues-reporting-generic/
[Cake.Issues.Reporting.Sarif]: https://cakebuild.net/extensions/cake-issues-reporting-sarif/
[Cake.Frosting.Issues.Reporting.Sarif]: https://cakebuild.net/extensions/cake-issues-reporting-sarif/
[Cake.Issues.PullRequests]: https://cakebuild.net/extensions/cake-issues-pullrequests/
[Cake.Frosting.Issues.PullRequests]: https://cakebuild.net/extensions/cake-issues-pullrequests/
[Cake.Issues.PullRequests.AppVeyor]: https://cakebuild.net/extensions/cake-issues-pullrequests-appveyor/
[Cake.Frosting.Issues.PullRequests.AppVeyor]: https://cakebuild.net/extensions/cake-issues-pullrequests-appveyor/
[Cake.Issues.PullRequests.AzureDevOps]: https://cakebuild.net/extensions/cake-issues-pullrequests-azuredevops/
[Cake.Frosting.Issues.PullRequests.AzureDevOps]: https://cakebuild.net/extensions/cake-issues-pullrequests-azuredevops/
[Cake.Issues.PullRequests.GitHubActions]: https://cakebuild.net/extensions/cake-issues-pullrequests-githubactions/
[Cake.Frosting.Issues.PullRequests.GitHubActions]: https://cakebuild.net/extensions/cake-issues-pullrequests-githubactions/
[Cake.AzureDevOps]: https://cakebuild.net/extensions/cake-azuredevops/
48 changes: 48 additions & 0 deletions docs/input/docs/recipe/supported-tools.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
Order: 30
Title: Supported tools
Description: Tools supported by Cake.Issues recipes.
---

Cake.Issues recipes support reading issues from different tools and integrates with different build and pull request systems.

# Tools

Cake.Issues recipes support reading issues from output of the following tools:

| Tool | Format | Cake.Issues.Recipe Methods | Cake.Frosting.Issues.Recipe Method |
|-----------------------------------|----------------------------------------|------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------|
| MsBuild | [MSBuild Extension Pack XmlFileLogger] | `IssuesParameters.InputFiles.`<br/>&nbsp;&nbsp;&nbsp;&nbsp;`AddMsBuildXmlFileLoggerLogFile*()` | `IssuesContext.Parameters.InputFiles.`<br/>&nbsp;&nbsp;&nbsp;&nbsp;`AddMsBuildXmlFileLoggerLogFile*()` |
| MsBuild | Binary Log File | `IssuesParameters.InputFiles.`<br/>&nbsp;&nbsp;&nbsp;&nbsp;`AddMsBuildBinaryLogFile*()` | `IssuesContext.Parameters.InputFiles.`<br/>&nbsp;&nbsp;&nbsp;&nbsp;`AddMsBuildBinaryLogFile*()` |
| JetBrains InspectCode (ReSharper) | | `IssuesParameters.InputFiles.`<br/>&nbsp;&nbsp;&nbsp;&nbsp;`AddInspectCodeLogFile*()` | `IssuesContext.Parameters.InputFiles.`<br/>&nbsp;&nbsp;&nbsp;&nbsp;`AddInspectCodeLogFile*()` |
| markdownlint | [markdownlint-cli] | `IssuesParameters.InputFiles.`<br/>&nbsp;&nbsp;&nbsp;&nbsp;`AddMarkdownlintCliLogFile*()` | `IssuesContext.Parameters.InputFiles.`<br/>&nbsp;&nbsp;&nbsp;&nbsp;`AddMarkdownlintCliLogFile*()` |
| markdownlint | [markdownlint-cli] with `--json` | `IssuesParameters.InputFiles.`<br/>&nbsp;&nbsp;&nbsp;&nbsp;`AddMarkdownlintCliJsonLogFile*()` | `IssuesContext.Parameters.InputFiles.`<br/>&nbsp;&nbsp;&nbsp;&nbsp;`AddMarkdownlintCliJsonLogFile*()` |
| markdownlint | [markdownlint] version 1 | `IssuesParameters.InputFiles.`<br/>&nbsp;&nbsp;&nbsp;&nbsp;`AddMarkdownlintV1LogFile*()` | `IssuesContext.Parameters.InputFiles.`<br/>&nbsp;&nbsp;&nbsp;&nbsp;`AddMarkdownlintV1LogFile*()` |
| [ESLint] | [json formatter] | `IssuesParameters.InputFiles.`<br/>&nbsp;&nbsp;&nbsp;&nbsp;`AddEsLintJsonLogFile*()` | `IssuesContext.Parameters.InputFiles.`<br/>&nbsp;&nbsp;&nbsp;&nbsp;`AddEsLintJsonLogFile*()` |
| Any SARIF compatible tool | [SARIF] | `IssuesParameters.InputFiles.`<br/>&nbsp;&nbsp;&nbsp;&nbsp;`AddSarifLogFile*()` | `IssuesContext.Parameters.InputFiles.`<br/>&nbsp;&nbsp;&nbsp;&nbsp;`AddSarifLogFile*()` |

[MSBuild Extension Pack XmlFileLogger]: http://www.msbuildextensionpack.com/help/4.0.5.0/html/242ab4fd-c2e2-f6aa-325b-7588725aed24.htm
[markdownlint-cli]: https://github.com/igorshubovych/markdownlint-cli
[markdownlint]: https://github.com/DavidAnson/markdownlint
[ESLint]: https://eslint.org/
[json formatter]: https://eslint.org/docs/user-guide/formatters/#json
[SARIF]: https://sarifweb.azurewebsites.net/

# Build systems

Cake.Issues recipes integrates with the following build systems:

| Build System | Write issues to build server | Issues summary | Full issues report |
|--------------------------------|-----------------------------------------------------------------------------------|--------------------------------------------------------------------|--------------------------------------------------------------------|
| AppVeyor | <span class="glyphicon glyphicon-ok" style="color:green"></span> | <span class="glyphicon glyphicon-remove" style="color:red"></span> | <span class="glyphicon glyphicon-ok" style="color:green"></span> |
| Azure Pipelines (Azure DevOps) | <span class="glyphicon glyphicon-ok" style="color:orange"></span> (Only first 10) | <span class="glyphicon glyphicon-ok" style="color:green"></span> | <span class="glyphicon glyphicon-ok" style="color:green"></span> |
| GitHub Actions | <span class="glyphicon glyphicon-ok" style="color:green"></span> | <span class="glyphicon glyphicon-remove" style="color:red"></span> | <span class="glyphicon glyphicon-remove" style="color:red"></span> |

# Pull request systems

Cake.Issues recipes integrates with the following pull request systems:

| Pull Request System | Write issues to pull requests | Set pull request status |
|----------------------------|----------------------------------------------------------------------------------------------------|--------------------------------------------------------------------|
| Azure Repos (Azure DevOps) | <span class="glyphicon glyphicon-ok" style="color:green"></span> | <span class="glyphicon glyphicon-ok" style="color:green"></span> |
| GitHub | <span class="glyphicon glyphicon-ok" style="color:orange"></span> (When build from GitHub Actions) | <span class="glyphicon glyphicon-remove" style="color:red"></span> |
19 changes: 19 additions & 0 deletions docs/input/docs/recipe/tasks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
Order: 60
Title: Tasks
Description: Tasks provided by Cake.Issues recipes.
---

Cake.Issues recipes provide the following tasks to your build script:

| Task | Description | Cake.Issues.Recipe task instance | Cake.Frosting.Issues.Recipe task type |
|------------------------------|----------------------------------------------|---------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------|
| `Issues` | Main tasks for issue management integration. | `IssuesBuildTasks.`<br/>&nbsp;&nbsp;&nbsp;&nbsp;`IssuesTask` | `Cake.Frosting.Issues.Recipe.`<br/>&nbsp;&nbsp;&nbsp;&nbsp;`IssuesTask` |
| `Read-Issues` | Reads issues from the provided log files. | `IssuesBuildTasks.`<br/>&nbsp;&nbsp;&nbsp;&nbsp;`ReadIssuesTask` | `Cake.Frosting.Issues.Recipe.`<br/>&nbsp;&nbsp;&nbsp;&nbsp;`ReadIssuesTask` |
| `Create-FullIssuesReport` | Creates issue report. | `IssuesBuildTasks.`<br/>&nbsp;&nbsp;&nbsp;&nbsp;`CreateFullIssuesReportTask` | `Cake.Frosting.Issues.Recipe.`<br/>&nbsp;&nbsp;&nbsp;&nbsp;`CreateFullIssuesReportTask` |
| `Publish-IssuesArtifacts` | Publish artifacts to build server. | `IssuesBuildTasks.`<br/>&nbsp;&nbsp;&nbsp;&nbsp;`PublishIssuesArtifactsTask` | `Cake.Frosting.Issues.Recipe.`<br/>&nbsp;&nbsp;&nbsp;&nbsp;`PublishIssuesArtifactsTask` |
| `Report-IssuesToBuildServer` | Report issues to build server. | `IssuesBuildTasks.`<br/>&nbsp;&nbsp;&nbsp;&nbsp;`ReportIssuesToBuildServerTask` | `Cake.Frosting.Issues.Recipe.`<br/>&nbsp;&nbsp;&nbsp;&nbsp;`ReportIssuesToBuildServerTask` |
| `Create-SummaryIssuesReport` | Creates a summary issue report. | `IssuesBuildTasks.`<br/>&nbsp;&nbsp;&nbsp;&nbsp;`CreateSummaryIssuesReportTask` | `Cake.Frosting.Issues.Recipe.`<br/>&nbsp;&nbsp;&nbsp;&nbsp;`CreateSummaryIssuesReportTask` |
| `Report-IssuesToPullRequest` | Report issues to pull request. | `IssuesBuildTasks.`<br/>&nbsp;&nbsp;&nbsp;&nbsp;`ReportIssuesToPullRequestTask` | `Cake.Frosting.Issues.Recipe.`<br/>&nbsp;&nbsp;&nbsp;&nbsp;`ReportIssuesToPullRequestTask` |
| `Set-PullRequestIssuesState` | Set pull request status. | `IssuesBuildTasks.`<br/>&nbsp;&nbsp;&nbsp;&nbsp;`SetPullRequestIssuesStateTask` | `Cake.Frosting.Issues.Recipe.`<br/>&nbsp;&nbsp;&nbsp;&nbsp;`SetPullRequestIssuesStateTask` |
| `Report-IssuesToConsole` | Report issues to console. | `IssuesBuildTasks.`<br/>&nbsp;&nbsp;&nbsp;&nbsp;`ReportIssuesToConsoleTask` | `Cake.Frosting.Issues.Recipe.`<br/>&nbsp;&nbsp;&nbsp;&nbsp;`ReportIssuesToConsoleTask` |
7 changes: 7 additions & 0 deletions docs/input/docs/recipe/usage/index.cshtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
Order: 20
Description: How to use Cake.Issues recipes in your build script.
---
<p>@Html.Raw(Model.String(DocsKeys.Description))</p>

@Html.Partial("_ChildPages")
Loading

0 comments on commit b9cbeff

Please sign in to comment.