[英]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
开头的特定于数据工厂的命令,因此您可以在这两种情况下使用它们。
az datafactory pipeline-run
az datafactory pipeline-run
开始运行az datafactory pipeline-run show
eg once a minuteaz 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.