azure - 如何在 Azure DevOps 中使部分成功的阶段变为失败?

标签 azure azure-devops azure-pipelines

我正在发布管道上运行 Newman 测试,但是当测试出错时,它只是将该阶段标记为部分成功,但我想让它无法触发自动重新部署触发器。这可能吗?

enter image description here

最佳答案

如果您使用 powershell 任务来触发 newman 测试,您可以使用以下命令设置任务结果状态。

  • 写入主机“##vso[task.complete result=Succeeded;]”
  • 写入主机“##vso[task.complete result=SucceededWithIssues;]”
  • 写入主机“##vso[task.complete result=Failed;]”

关于azure - 如何在 Azure DevOps 中使部分成功的阶段变为失败?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64095953/

相关文章:

azure - 如何在 Azure APIM 中构建此 url 重写策略?

azure-devops - 如何在 VSTS 构建过程中在创建 zip 之前修改发布工件文件夹 $(build.artifactstagingdirectory)?

ios - 通过Azure Devops Extension上传到AppStore时如何修复 "Invalid Provisioning Profile"?

c# - 在 Azure Pipeline 和 Linux 上构建 .Net Framework

azure - 创建 SSL 证书时出现意外错误 : certificate and private key does not have a matching public key: tls: private key does not match public key

azure - 在存储帐户中授予应用程序角色 "storage blob data contributor"

c# - Azure 函数触发两次 - VS 2017 预览版

linux - Azure Devops 管道,使用自托管代理了解管道何时完成的方法

git - 如何通过将标签推送到 github 来触发 Azure 管道中的构建

azure - 将 Azure 构建工件发送到 Feed