简体   繁体   English

Azure 数据工厂的发布过程是否支持导出 ARM 模板?

[英]Any cli support for Azure data factory's publish process to export ARM templates?

We have setup ADF with Azure DevOps git integration.我们已经使用 Azure DevOps git 集成设置了 ADF。 Our CD pipeline is triggered when there are new ARM templates pushed to adf_publish branch.当有新的 ARM 模板推送到 adf_publish 分支时,将触发我们的 CD 管道。

Current process on our pipeline is, once a PR is approved it is merged to collaboration branch (Master).我们管道上的当前流程是,一旦 PR 获得批准,它就会合并到协作分支(Master)。 Once this is done, we go to the portal and manually click on ADF's publish button to generate the ARM templates in adf_publish branch.完成此操作后,我们将 go 转到门户并手动单击 ADF 的发布按钮以在 adf_publish 分支中生成 ARM 模板。 I am unable to automate this end to end due to us having to manually Publish the changes.由于我们必须手动发布更改,我无法实现端到端的自动化。

Ideally I am looking at automating the publishing part.理想情况下,我正在研究自动化发布部分。 Once the PR is approved our pipeline should be able to execute the publishing process automatically.一旦 PR 获得批准,我们的管道应该能够自动执行发布过程。 I have been unable to find a way to automate the publishing part.我一直无法找到自动化发布部分的方法。

So the question is, is there a way to execute ADF publishing process via AZ or PoweShell CLI or some other way?所以问题是,有没有办法通过 AZ 或 PoweShell CLI 或其他方式执行 ADF 发布过程? Suggestions welcome.欢迎提出建议。 Thanks谢谢

Any cli support for Azure data factory's publish process to export ARM templates? Azure 数据工厂的发布过程是否支持导出 ARM 模板?

There is a same issue on the github about this issue, and Nowinski provided a brand new PowerShell open-source module to publish the whole Azure Data Factory code from master branch: github上也有同样的问题,关于这个问题,Nowinski提供了一个全新的PowerShell开源模块从master分支发布整个Azure数据工厂代码

Publish from Azure DevOps 从 Azure DevOps 发布

variables:
  ResourceGroupName: 'rg-devops-factory'
  DataFactoryName: 'SQLPlayerDemo'
steps:
- powershell: |
   Install-Module Az.DataFactory -MinimumVersion "1.7.0" -Force
   Install-Module -Name "azure.datafactory.tools" -Force
   Import-Module -Name "azure.datafactory.tools" -Force
  displayName: 'PowerShell Script'
steps:
- task: AzurePowerShell@4
  displayName: 'Azure PowerShell script: InlineScript'
  inputs:
    azureSubscription: 'Subscription'
    ScriptType: InlineScript
    Inline: |
     Publish-AdfV2FromJson -RootFolder "$(System.DefaultWorkingDirectory)/_ArtifactName_/" -ResourceGroupName "$(ResourceGroupName)" -DataFactoryName "$(DataFactoryName)" -Location "$(Location)" -Stage "$(Release.EnvironmentName)"

    FailOnStandardError: true
    azurePowerShellVersion: LatestVersion```

Besides, we could try to use code repository with ADF not by Exporting of ARM Template.此外,我们可以尝试使用带有 ADF 的代码存储库,而不是通过导出 ARM 模板。

Please check this document Deployment of Azure Data Factory with Azure DevOps for some more details.请查看此文档部署 Azure 数据工厂与 Azure DevOps了解更多详细信息。

Hope this helps.希望这可以帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM