Azure-Player / azure.datafactory.devops

Azure DevOps Deployment Tasks for Azure Data Factory objects
MIT License
39 stars 21 forks source link

The property 'Name' cannot be found on this object. #106

Closed troyinsight closed 1 year ago

troyinsight commented 1 year ago

Hello,

Trying to run PublishADFTask@1, I'm getting right down to the end before receiving what seems to be a PowerShell error.

STEP: Replacing all properties environment-related...
Config file:   D:\a\1\s\deployment\config-***.csv
Validation of config file completed.
##[error]The property 'Name' cannot be found on this object. Verify that the property exists.
Finishing: Push code to Data Factory

I'm just running a single task, updating some values via a CSV.

  - task: PublishADFTask@1
    displayName: 'Push code to Data Factory'
    inputs:
      ConnectedServiceName: ${{ parameters.serviceConnectionName }}
      ResourceGroupName: $(CustomerResourceGroupName)
      DataFactoryName: $(CustomerDataFactoryName)
      Location: $(CustomerLocation)
      DataFactoryCodePath: '$(Agent.BuildDirectory)\s'
      StopStartTriggers: false
      CreateNewInstance: false
      IgnoreLackOfReferencedObject: false
      StageType: Stage
      StageCode: $(Environment)
      FilteringType: 'Inline'
      FilterText: |
        -trigger.*
        -factory.*
      PublishMethod: 'AzResource'

Do you have any ideas?

troyinsight commented 1 year ago

Just to add some further information, it works when my CSV file looks like this:

type,name,path,value
linkedService,AzureKeyVault_LinkedService,typeProperties.baseUrl,"https://***.vault.azure.net/"

But doesn't work when it looks like this:

type,name,path,value
linkedService,AzureKeyVault_LinkedService,typeProperties.baseUrl,"https://***.vault.azure.net/"
integrationRuntime,SelfHostedIntegrationRuntime,description,"Linked Customer Self-Hosted Integration Runtime"
integrationRuntime,SelfHostedIntegrationRuntime,+typeProperties.linkedInfo,"{'resourceId':'/subscriptions/***/resourcegroups/***/providers/Microsoft.DataFactory/factories/***/integrationruntimes/***','authorizationType':'Rbac'}"

Looks fine to me. The name of my IR is SelfHostedIntegrationRuntime (as per the CSV)

NowinskiK commented 1 year ago

Can you prepare a test environment and script on your local machine? You can use this example as guidance: https://github.com/SQLPlayer/azure.datafactory.tools/tree/master/adhoc/issue-240-v2