Writing Messages To AppVeyor
This example shows how to report issues as messages to an AppVeyor build.
To report issues as messages to an AppVeyor build you need to import the core addin, the core pull request addin, the AppVeyor support and one or more issue providers, in this example for JetBrains InspectCode:
#addin nuget:?package=Cake.Issues&version=5.0.1
#addin nuget:?package=Cake.Issues.InspectCode&version=5.0.1
#addin nuget:?package=Cake.Issues.PullRequests&version=5.0.1
#addin nuget:?package=Cake.Issues.PullRequests.AppVeyor&version=5.0.1
In the following task we'll first determine the remote repository URL and source branch of the pull request and with this information call the AppVeyorBuilds alias:
Task("ReportIssuesToAppVeyor").Does(() =>
{
var repoRootFolder = MakeAbsolute(Directory("./"));
ReportIssuesToPullRequest(
InspectCodeIssuesFromFilePath(
@"C:\build\inspectcode.log"),
AppVeyorBuilds(),
repoRootFolder);
});
The output will look similar to this: