Azure devops 如何从CI/CD管道监视adf管道
我有一个CD管道,它会触发azure数据工厂(adf)管道,但它(CD管道)不会等到(adf)管道完成后再继续执行下一个任务。我想知道CD管道中是否有内置的功能,通过它我可以触发和监视adf管道Azure devops 如何从CI/CD管道监视adf管道,azure-devops,continuous-integration,azure-pipelines,azure-data-factory,Azure Devops,Continuous Integration,Azure Pipelines,Azure Data Factory,我有一个CD管道,它会触发azure数据工厂(adf)管道,但它(CD管道)不会等到(adf)管道完成后再继续执行下一个任务。我想知道CD管道中是否有内置的功能,通过它我可以触发和监视adf管道 因此,我希望CD管道在继续CD管道中的下一个任务之前,应该等待adf管道完成。您可以使用Azure DevOps中的以下Powershell脚本 $resourceGroupName = "yourresourcegroup" $DataFactoryName = "yourdatafactor
因此,我希望CD管道在继续CD管道中的下一个任务之前,应该等待adf管道完成。您可以使用Azure DevOps中的以下Powershell脚本
$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)
您是否使用PowerShell启动ADF运行?Azure DevOps没有可触发并等待任务的本机活动,但使用powershell脚本实现此任务应该不会太困难。我正在使用本机活动触发ADF,并尝试尽可能多地使用本机活动:)。但这似乎需要powershell。