如何从CI/CD管道监视adf管道

编程入门 行业动态 更新时间:2024-10-24 05:21:50
本文介绍了如何从CI/CD管道监视adf管道的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有一条CD管道,它触发了一个天蓝色的数据工厂(adf)管道,但它(CD管道)直到(adf)管道完成才等到下一个任务.我想知道CD管道中是否有任何内置功能,通过它们我可以触发和监视adf管道.

I have a CD Pipeline which triggers an azure data factory(adf) pipeline but it(CD pipeline) doesn't wait to proceed with next tasks until the(adf) pipeline completes. I wanna know that is there any inbuilt capabilities in CD pipeline through which i can trigger as well as monitor adf pipeline.

因此,我希望得到的结果是CD管道应等待adf管道完成,然后再继续执行CD管道中的下一个任务.

So, my desired outcome is that CD pipeline should wait for adf pipeline to complete before proceeding with next tasks in CD pipeline.

推荐答案

您可以使用Azure DevOps中的以下Powershell脚本.

You can use the following Powershell script from Azure DevOps.

$resourceGroupName = "yourresourcegroup" $DataFactoryName = "yourdatafactory" $pipelineName = "yourpipeline" $pollFrequency = 1 $executionId = Invoke-AzDataFactoryV2Pipeline -ResourceGroupName $resourceGroupName -DataFactoryName $DataFactoryName -PipelineName $pipelineName $runStatus = (Get-AzDataFactoryV2PipelineRun -ResourceGroupName $resourceGroupName -DataFactoryName $DataFactoryName -PipelineRunId $executionId).Status While ($runStatus -eq 'InProgress') { Write-Host ("Pipeline {0} in progress" -f $pipelineName) Start-Sleep $pollFrequency $runStatus = (Get-AzDataFactoryV2PipelineRun -ResourceGroupName $resourceGroupName -DataFactoryName $DataFactoryName -PipelineRunId $executionId).Status } Write-Host ("Pipeline {0} finished with status {1}" -f $pipelineName, $runStatus)

更多推荐

如何从CI/CD管道监视adf管道

本文发布于:2023-11-06 14:31:35,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1563950.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:管道   CI   CD   adf

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!