使用VSTS版本发布Azure Data Factory项目 [英] Release Azure Data Factory project using VSTS Release

查看:150
本文介绍了使用VSTS版本发布Azure Data Factory项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在Visual Studio中创建一个Azure数据工厂项目,而不是直接在Azure门户中创建一个Azure数据工厂.之所以这样,是因为我希望该项目处于源代码控制中,因为它是一个团队项目,并且为了对其进行备份.

I want to create an Azure Data Factory project in Visual Studio rather than create an Azure Data Factory directly in the Azure portal. The reason why is that I wish to have the project in source control since it is a team project and for the sake of having it backed up.

我想使用Visual Studio Team Services来自动化上述Azure Data Factory项目的生成和发布过程.构建过程很简单;这将是在解决方案上运行的MSBuild.但是,我不确定如何进行Release定义.是否有一个任务/一组任务或其他方法可以使我将Azure Data Factory项目部署到Azure中?

I want to use Visual Studio Team Services to automate the Build and Release processes for the aforementioned Azure Data Factory project. The Build process is straightforward; it will be an MSBuild run on the solution. However, I am unsure how to go about the Release definition. Is there a task/set of tasks or a different method that will allow me to deploy my Azure Data Factory project into Azure?

推荐答案

您可以使用PowerShell部署Azure Data Factory.

You can deploy Azure Data Factory using PowerShell.

  1. 添加Azure PowerShell步骤/任务以构建/发布定义
  2. 简单脚本:

代码:

foreach($file in Get-ChildItem "[ProjectFolder]" -filter "LinkedService*")
{
  New-AzureRmDataFactoryLinkedService -ResourceGroupName "ADF" -DataFactoryName "SampleFactory" -Name $file.BaseName -File $file.FullName -Force | Format-List
}
foreach($file in Get-ChildItem "[ProjectFolder]" -filter "DataSet*")
{
 New-AzureRmDataFactoryDataset -ResourceGroupName "ADF" -DataFactoryName "SampleFactory" -Name $file.BaseName -File $file.FullName -Force | Format-List
}
foreach($file in Get-ChildItem "[ProjectFolder]" -filter "Pipeline*")
{
 New-AzureRmDataFactoryPipeline -ResourceGroupName "ADF" -DataFactoryName "SampleFactory" -Name $file.BaseName -File $file.FullName -Force | Format-List
}

更多信息,您可以参考这篇文章:

More information, you can refer to this article: Deploy Azure Data Factory using PowerShell.

这篇关于使用VSTS版本发布Azure Data Factory项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆