Cake.Common.Build.AzurePipelines vs Cake.AzureDevOps #4203
-
ITNOA I found two way (native and extension) in cake exist for communication with Azure DevOps, I want to know which one is better (official support and better maintenance) In another way I try to use Cake.Common.Build.AzurePipelines to publish test, but I failed as you can see in below
and my cake publish code like below https://stackoverflow.com/q/66184826/1539100 if (testProjects.Any() && AzurePipelines.IsRunningOnAzurePipelines)
{
Information("Publish test result.....................................");
if (testResultsFiles.Any())
{
AzurePipelines.Commands.PublishTestResults(
new AzurePipelinesPublishTestResultsData
{
TestResultsFiles = testResultsFiles.ToArray(),
TestRunner = AzurePipelinesTestRunnerType.NUnit
}
);
}
if (vsTestResultsFiles.Any())
{
AzurePipelines.Commands.PublishTestResults(
new AzurePipelinesPublishTestResultsData
{
TestResultsFiles = vsTestResultsFiles.ToArray(),
TestRunner = AzurePipelinesTestRunnerType.VSTest
}
);
}
} |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
In your concrete example the issue seems to be that the test results file is missing. Where differences between Regarding the differences: They both serve a different purpose / have different implications and are supplementary to each other. There is no general better here, but it depends on your concrete situation and requirements. Cake.Common.Build.AzurePipelines
Cake.AzureDevOpsCake.AzureDevOps addin provides additional Cake aliases which use Azure DevOps REST API underneath. You can see it as a convenience layer instead of making direct HTTP requests. Comparison
Cake.AzureDevOps can cover more scenarios than what is possible through service messages in
|
Beta Was this translation helpful? Give feedback.
In your concrete example the issue seems to be that the test results file is missing. Where differences between
Cake.Common.Build.AzurePipelines
andCake.AzureDevOps
are irrelevant.Regarding the differences: They both serve a different purpose / have different implications and are supplementary to each other. There is no general better here, but it depends on your concrete situation and requirements.
Cake.Common.Build.AzurePipelines
Cake.Common.Build.AzurePipelines
provides an API to access values provided by Azure Pipelines through environment variables and allows to pass values to the Azure Pipelines build through service messages (e.g. Logging commands.Cake.AzureDevOps
Cake.AzureDevOps …