CI/CD 自动发布 Azure 数据工厂
CI/CD Automated publish Azure Data Factory
尝试按照此 [Microsoft 文档][1] 自动发布我的更改时遇到一些错误。拜托,需要一些支持来解决这个问题:)
亲切的问候,
迪基
错误=== LocalFileClientService:无法读取文件:/home/vsts/work/1/s/arm-template-parameters-definition.json,错误:{“堆栈”:“错误:ENOENT:没有这样的文件或目录,打开'/home/vsts/work/1/s/arm-template-parameters-definition.json'","message":"ENOENT: 没有这样的文件或目录,打开'/home/vsts/work/1/s/arm-template-parameters-definition.json'","errno":-2,"code ":"ENOENT","系统调用":"打开","路径":"/home/vsts/work/1/s/arm-template-parameters-definition.json"}
警告 === ArmTemplateUtils:_getUserParameterDefinitionJson - 无法从 repo 加载自定义参数文件,将使用默认文件。错误:{“堆栈”:“错误:ENOENT:没有这样的文件或目录,打开'/home/vsts/work/1/s/arm-template-parameters-definition。json'”,“消息”:“ENOENT:没有这样的文件或目录,打开'/home/vsts/work/1/s/arm-template-parameters-definition.json'","errno":-2,"code":"ENOENT","syscall":"open","path":"/home/vsts/work/1/s/arm-template-parameters-definition.json"
- main
pool:
vmImage: 'ubuntu-latest'
steps:
- task: NodeTool@0
inputs:
versionSpec: '10.x'
displayName: 'Install Node.js'
- task: Npm@1
inputs:
command: 'install'
verbose: true
displayName: 'Install npm package'
- task: Npm@1
inputs:
command: 'custom'
customCommand: 'run build validate $(Build.Repository.LocalPath) /subscriptions/xxxxxxxxx/resourceGroups/RG-Dick-DP203/providers/Microsoft.DataFactory/factories/df-testfactory-dev-9999'
displayName: 'Validate'
# Validate and then generate the ARM template into the destination folder. Same as clicking "Publish" from UX
# The ARM template generated is not published to the ‘Live’ version of the factory. Deployment should be done using a release pipeline.
- task: Npm@1
inputs:
command: 'custom'
customCommand: 'run build export $(Build.Repository.LocalPath) /subscriptions/xxxxxxxxx/resourceGroups/RG-Dick-DP203/providers/Microsoft.DataFactory/factories/df-testfactory-dev-9999 "ArmTemplate"'
displayName: 'Validate and Generate ARM template'
# Publish the Artifact to be used as a source for a release pipeline
- task: PublishPipelineArtifact@1
inputs:
targetPath: '$(Build.Repository.LocalPath)/ArmTemplate'
artifact: 'ArmTemplates'
publishLocation: 'pipeline'```
[Repo][2]
[Build][3]
[1]: https://docs.microsoft.com/en-us/azure/data-factory/continuous-integration-deployment-improvements
[2]: https://i.stack.imgur.com/Mv0mg.png
[3]: https://i.stack.imgur.com/uirN1.png
我在自动部署 ADF 时也遇到了这个错误。
当您想要自定义资源管理器模板中的参数时,丢失的文件会自动添加到您的存储库中,如下所述:https://docs.microsoft.com/en-us/azure/data-factory/continuous-integration-deployment#use-custom-parameters-with-the-resource-manager-template
To override the default Resource Manager parameter configuration, go
to the Manage hub and select ARM template in the "Source control"
section. Under ARM parameter configuration section, click Edit icon in
"Edit parameter configuration" to open the Resource Manager parameter
configuration code editor.
Creating a custom Resource Manager parameter configuration creates a
file named arm-template-parameters-definition.json in the root folder
of your git branch. You must use that exact file name.
我认为创建此文件并使用提供的默认值是安全的,即使您不需要自定义参数也是如此。从我的测试来看,忽略错误似乎也是安全的。
尝试按照此 [Microsoft 文档][1] 自动发布我的更改时遇到一些错误。拜托,需要一些支持来解决这个问题:)
亲切的问候,
迪基
错误=== LocalFileClientService:无法读取文件:/home/vsts/work/1/s/arm-template-parameters-definition.json,错误:{“堆栈”:“错误:ENOENT:没有这样的文件或目录,打开'/home/vsts/work/1/s/arm-template-parameters-definition.json'","message":"ENOENT: 没有这样的文件或目录,打开'/home/vsts/work/1/s/arm-template-parameters-definition.json'","errno":-2,"code ":"ENOENT","系统调用":"打开","路径":"/home/vsts/work/1/s/arm-template-parameters-definition.json"} 警告 === ArmTemplateUtils:_getUserParameterDefinitionJson - 无法从 repo 加载自定义参数文件,将使用默认文件。错误:{“堆栈”:“错误:ENOENT:没有这样的文件或目录,打开'/home/vsts/work/1/s/arm-template-parameters-definition。json'”,“消息”:“ENOENT:没有这样的文件或目录,打开'/home/vsts/work/1/s/arm-template-parameters-definition.json'","errno":-2,"code":"ENOENT","syscall":"open","path":"/home/vsts/work/1/s/arm-template-parameters-definition.json"
- main
pool:
vmImage: 'ubuntu-latest'
steps:
- task: NodeTool@0
inputs:
versionSpec: '10.x'
displayName: 'Install Node.js'
- task: Npm@1
inputs:
command: 'install'
verbose: true
displayName: 'Install npm package'
- task: Npm@1
inputs:
command: 'custom'
customCommand: 'run build validate $(Build.Repository.LocalPath) /subscriptions/xxxxxxxxx/resourceGroups/RG-Dick-DP203/providers/Microsoft.DataFactory/factories/df-testfactory-dev-9999'
displayName: 'Validate'
# Validate and then generate the ARM template into the destination folder. Same as clicking "Publish" from UX
# The ARM template generated is not published to the ‘Live’ version of the factory. Deployment should be done using a release pipeline.
- task: Npm@1
inputs:
command: 'custom'
customCommand: 'run build export $(Build.Repository.LocalPath) /subscriptions/xxxxxxxxx/resourceGroups/RG-Dick-DP203/providers/Microsoft.DataFactory/factories/df-testfactory-dev-9999 "ArmTemplate"'
displayName: 'Validate and Generate ARM template'
# Publish the Artifact to be used as a source for a release pipeline
- task: PublishPipelineArtifact@1
inputs:
targetPath: '$(Build.Repository.LocalPath)/ArmTemplate'
artifact: 'ArmTemplates'
publishLocation: 'pipeline'```
[Repo][2]
[Build][3]
[1]: https://docs.microsoft.com/en-us/azure/data-factory/continuous-integration-deployment-improvements
[2]: https://i.stack.imgur.com/Mv0mg.png
[3]: https://i.stack.imgur.com/uirN1.png
我在自动部署 ADF 时也遇到了这个错误。 当您想要自定义资源管理器模板中的参数时,丢失的文件会自动添加到您的存储库中,如下所述:https://docs.microsoft.com/en-us/azure/data-factory/continuous-integration-deployment#use-custom-parameters-with-the-resource-manager-template
To override the default Resource Manager parameter configuration, go to the Manage hub and select ARM template in the "Source control" section. Under ARM parameter configuration section, click Edit icon in "Edit parameter configuration" to open the Resource Manager parameter configuration code editor.
Creating a custom Resource Manager parameter configuration creates a file named arm-template-parameters-definition.json in the root folder of your git branch. You must use that exact file name.
我认为创建此文件并使用提供的默认值是安全的,即使您不需要自定义参数也是如此。从我的测试来看,忽略错误似乎也是安全的。