Azure CI/CD 管道。在发布管道中运行 .net core 构建和测试

标签 azure azure-devops azure-pipelines azure-pipelines-release-pipeline

我已经配置了构建管道,并且在 CI 成功完成后,它会触发发布工件,即发布管道。现在在发布管道中,我想运行集成测试。该解决方案构建它本身失败。

Git 存储库:Git repo link

构建 CI 管道:

enter image description here

发布 CD 管道:

enter image description here

enter image description here

enter image description here

enter image description here

最佳答案

我们正在发布管道中运行测试。 原因是,我们想要使用新发布的代码进行系统测试。

在您的管道中,测试位于之前 - 因此最好将它们放在构建管道中。

我们在发布中运行 .NET Core 测试的方式分为两个步骤:

  1. 将包含测试项目的文件夹发布到工件
  2. 在发布管道中添加两个 .NET Core 步骤

    • 命令:恢复,路径:test.csproj的路径
    • 命令:test,路径:test.csproj的路径,参数:--no-build -c Release

关于Azure CI/CD 管道。在发布管道中运行 .net core 构建和测试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53616893/

相关文章:

azure - 使用 terraform 在 Azure APIM api 中创建新操作

javascript - Azure AD B2C 注册页面用户流

azure - 通过 REST API 将 secret 变量传递到 Azure DevOps 发布管道时出错

azure - 在 VSTS 中构建arm模板失败,错误约为 'artifactsLocation'

c# - 当 Nullable<bool> 为 Null 时,无法将其保存到 Azure 表

javascript - Azure DevOps 在部署之前更新代码内的变量

azure - 将 Web 应用程序发布到 Azure 时,访问/obj/Release/net461/win7-x86/PubTmp/Out/被拒绝

azure-devops - Gitversion 在 devops 构建中使用日期作为主要版本

tfs - TFS Build Online 2017 中 $(Build.Repository.LocalPath) 和 $(Build.SourcesDirectory) 的区别

azure - 取消构建时执行任务 - Azure DevOps Pipelines