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

时间:2018-12-04 16:01:24

标签: 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

1 个答案:

答案 0 :(得分:0)

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

在您的管道中进行测试之前-因此最好在 build 管道中进行测试。

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

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

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