如何等待 Azure 数据工厂管道在 Azure DevOps 中完成?

How to wait for Azure Data Factory pipeline to complete in Azure DevOps?

在我的 Azure DevOps 版本中,我需要触发 Azure 数据工厂管道并等待该过程完成。

在 Az DevOps 中,有没有什么方法可以做到这一点而无需任何特殊技巧?目前在我的版本中使用 vsts-publish-adf

谢谢

这是可行的,虽然我无法评估它是否适合你的情况。然而,这是实际的答案:

您可以使用以 az datafactory 开头的 Azure CLI Task that runs in your Release stage. Azure CLI has Data Factory-specific commands 触发并跟随管道 运行,因此您可以在这两种情况下使用它们。

  • 开始 运行 az datafactory pipeline-run
  • 等待循环完成,运行ning az datafactory pipeline-run show 例如一分钟一次

另一种解决方案可能是使用 REST API,例如 this example of monitoring the pipeline run

Is there any way to do this without any special trick in Az DevOps?

直接答案是 因为 third-party 任务本身不支持这种情况 设计

根据 comment from the Author liprec:此时任务仅触发管道 运行 而不是等待 运行 完成。他有计划添加这样一个任务等待和轮询任务运行。所以您想要的可能在未来几天内实现,但目前不支持

您必须使用 Powershell 脚本之类的东西通过 command-line 触发 ADF 管道 运行,就像 Mekki 上面建议的那样。这是另一个类似的 .