简体   繁体   English

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

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

In my Azure DevOps release, I need to trigger an Azure Data Factory pipeline and wait for the process to finish.在我的 Azure DevOps 版本中,我需要触发 Azure 数据工厂管道并等待该过程完成。

Is there any way to do this without any special trick in Az DevOps?在 Az DevOps 中没有任何特殊技巧的情况下,有什么方法可以做到这一点? Currently using vsts-publish-adf in my release.目前在我的版本中使用vsts-publish-adf

Thanks谢谢

It is feasible, though I am unable to evaluate whether it is a good idea in your situation.这是可行的,但我无法评估在您的情况下这是否是一个好主意。 Here's the practical answer however:然而,这是实际的答案:

You could trigger and follow the pipeline run with a Azure CLI Task that runs in your Release stage .您可以使用在发布阶段运行的Azure CLI 任务触发和跟踪管道运行。 Azure CLI has Data Factory-specific commands which begin with az datafactory , so you can use them in both cases. Azure CLI 具有以az datafactory开头的特定于数据工厂的命令,因此您可以在这两种情况下使用它们。

  • starting the run with az datafactory pipeline-run使用az datafactory pipeline-run开始运行
  • waiting for its completion in a loop, running az datafactory pipeline-run show eg once a minute在循环中等待其完成,运行az datafactory pipeline-run show例如每分钟一次

Another solution could be using a REST API, such as in this example of monitoring the pipeline run另一种解决方案可能是使用 REST API,例如在这个监控管道运行的示例中

Is there any way to do this without any special trick in Az DevOps?在 Az DevOps 中没有任何特殊技巧的情况下,有什么方法可以做到这一点?

The direct answer is No cause the third-party task itself doesn't support this scenario by design .直接的答案是没有,因为第三方任务本身不支持这种情况

According to comment from the Author liprec : At this moment the task only triggers a pipeline run and is not waiting for that run to complete.根据作者liprec的评论:此时任务仅触发管道运行,而不是等待该运行完成。 He has plans to add such a task to wait and poll the task run.他有计划添加这样一个任务来等待和轮询任务运行。 So what you want could be possible in coming days, but for now it's not supported .因此,您想要的可能在未来几天内实现,但目前尚不支持

You have to use something like Powershell scripts to trigger ADF pipeline run via command-line like Mekki suggests above.您必须使用诸如 Powershell 脚本之类的东西来触发 ADF 管道通过Mekki上面建议的命令行运行。 Here's another similar PS example .这是另一个类似的PS 示例

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Azure DevOps 管道任务等待另一个管道完成 - Azure DevOps pipeline task to wait to run for another pipeline to complete 如何等待数据工厂管道完成执行? - How to wait for data factory pipeline to complete the execution? 是否可以在 Azure 数据工厂的 Azure DevOps 中创建构建管道 - Is it possible to create build pipeline in Azure DevOps for Azure Data factory Azure 数据工厂管道 - Azure Data Factory pipeline Azure DevOps 数据工厂数据集和管道 CI/CD 参数 - Azure DevOps Data Factory Dataset and pipeline CI/CD Parameters 如何使用 .NET 数据工厂 ZF20E3C5E54C0893D36 启用 DeVOPS GIT 存储库在 Azure 数据工厂中发布管道? - How to publish pipeline in Azure Data Factory enabled with DeVOPS GIT repo using .NET Data Factory SDK (C# )? 如何删除 azure 数据工厂管道中的文件夹? - How to delete a folder in an azure data factory pipeline? 如何使用 Azure Devops 的任务清理 Azure 数据工厂的工作区? - How to clean workspace of Azure Data Factory using task of Azure Devops? 如何将 Azure 数据工厂 (ADF) 与 Azure DevOps 连接起来? - How to Connect Azure Data Factory (ADF) with Azure DevOps? 如何解决 Azure 数据工厂 2 中无法访问 Azure DevOps 存储库的问题 - How to resolve no access in Azure Data Factory 2 to Azure DevOps Repository
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM