Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

visual studio - Release Azure Data Factory project using VSTS Release

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.

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

You can deploy Azure Data Factory using PowerShell.

  1. Add Azure PowerShell step/task to build/release definition
  2. Simple script:

Code:

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...