Azure DevOps Release Pipeline-在某些阶段成功时运行此作业自定义条件
我在Azure中有一个发布管道,该管道“部署网站”和另一个阶段“更新Azure”。下一个阶段将运行“烟雾测试”,而运行作业则设置为“仅在所有以前的作业成功时”。
我想在烟雾测试后创建一个新阶段以运行回归测试阶段 - 只有当“部署网站”和“更新Azure”成功的情况下,即使“运行烟雾测试”成功并不重要或失败。
在新阶段的代理作业中,我认为我需要将此作业设置为“使用变量表达式的自定义条件”,然后设置变量表达式。
我无法找出要放入自定义字段的变量条件? 有没有一种方法可以访问“代理作业”的YAML代码?
I have a release pipeline in Azure which "Deploys Website" and another stage which "Updates Azure". The next stage runs a "Smoke Test" and run jobs is set to "only when all previous jobs have succeeded".
I want to create a new stage after the smoke test to run a regression test stage - only when "Deploy Website" and "Update Azure" both succeed i.e. it doesnt matter if "Run Smoke Tests" succeeds or fails.
In the agent job of the new stage I think I need set Run this job to "Custom condition using variable expressions" and then set a Variable Expression.
I cant figure out the variable condition to put in the custom field for? - only when "Deploy Website" and "Update Azure" both succeed.
Is there a way of accessing the yaml code for the "Agent job"?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以通过添加回归测试阶段来做到这一点,即使在某些阶段进行部分成功时,也可以在烟雾测试之后设置此阶段的预部部门条件并选择触发器。
在烟雾测试的任务中,在控制选项下启用继续错误。尽管出现了错误,这会导致烟雾测试作为部分成功注册,并确保您的回归测试将进行,无论烟雾测试的结果如何
You can do this by adding the regression test stage, setting the pre-deployment conditions for this stage as after the smoke test and selecting Trigger even when the selected stages partially succeed.
Within the tasks of the smoke test, under control options enable continue on error. This causes the smoke tests to register as partial success despite the errors and ensures your regressions tests will run regardless of the outcome of smoke test
您不能在经典版本中做到这一点,但是可以在YAML中完成:
但是您也许可以将基于休息的发行门砍在一起。
You can't do that in Classic releases, but it can be done in YAML:
You may be able to hack together a REST based release gate though.