首页 > 解决方案 > 有没有办法在 Azure Devops 中多次重试时间敏感步骤?

问题描述

我找到的所有答案都过时了,所以我想知道现在是否有办法在失败后重试一步?

例如:

Step - Install X
Step - Test if X is installed. 
           If failed, wait 1 minute, then retry two more times before total failure.

我遇到的问题是,第二步是第三方扩展,所以我不能使用 bash 或脚本在步骤中使用内部循环来完成它。

标签: azureazure-devops

解决方案


不,这还不可能。但是,这是在路线图上

在此处输入图像描述

添加了任务的自动重试,可以通过以下方式使用:

- task: <name of task>
  retryCountOnTaskFailure: <max number of retries>
   ...

但是The failing task is retried immediately.,因此无法定义等待时间。


推荐阅读