Azure-Player / azure.datafactory.tools

Tools for deploying Data Factory (v2) in Microsoft Azure
https://azureplayer.net/adftools
MIT License
212 stars 69 forks source link

Unable to recognize the datafactory from resource group {Script stopped working} #365

Closed zameer712 closed 1 year ago

zameer712 commented 1 year ago

Hello Team,

Hope you are doing well.

We are facing two different issues on our Azure data factory pipeline automation

  1. Suddenly it has stopped working while recognizing the below datafactory which already exists in the below resource Group , Screenshot for your reference

Config file: D:\a\prowess-dnd-datafactory\prowess-dnd-datafactory/Configurations/prowess-preprod-.json Write-Error: C:\Users\runneradmin\Documents\PowerShell\Modules\azure.datafactory.tools\1.7.0\private\Update-PropertiesFromFile.ps1:34 Line | 34 | $config = Read-JsonConfigFile -Path $configFileName -adf $adf | ~~~~~~~~~~~ | ADFT0017: Object [weuuathpwsadf02] could not be found.

  1. its unable to recognize below FQDN :-
.blob.core.windows.net: The term 'weuuathdndsta02.blob.core.windows.net' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. .table.core.windows.net: The term 'weuuathpwssta01.table.core.windows.net' is not recognized as a name of a cmdlet, function, script file, or executable program. Below is the code we are using for injecting the parameters and configuration - name: Checkout tools repo uses: actions/checkout@v3 with: repository: /data_factory_pe_configuration token: ${{ secrets.ADF_POC }} path: Configurations - name: Login via Az module uses: azure/login@v1 with: client-id: tenant-id: subscription-id: enable-AzPSSession: true - name: Run Azure PowerShell script uses: azure/powershell@v1 with: inlineScript: | $RootFolderADO = "${{ github.workspace }}/ADOJSON" $RootFolderConfig = "${{ github.workspace }}/Configurations/-preprod-.json" Get-ChildItem $RootFolderADO Set-PSRepository -Name PSGallery -InstallationPolicy Trusted Install-Module Az.Resources -RequiredVersion 6.4.1 -Repository PSGallery -Force Install-Module -Name Az.DataFactory -Repository PSGallery -Force Install-Module -Name azure.datafactory.tools -Repository PSGallery -force Import-Module -Name azure.datafactory.tools Get-Module -Name azure.datafactory.tools $SubscriptionName = '' Set-AzContext -Subscription $SubscriptionName $ResourceGroupName = '' $DataFactoryName = "" $Location = "westeurope" Publish-AdfV2FromJson -RootFolder $RootFolderADO -ResourceGroupName $ResourceGroupName -DataFactoryName $DataFactoryName -Location $Location -Stage $RootFolderConfig azPSVersion: "9.3.0" 3. Global parameters are not getting updated in proper way Did we had any change on powershell script
NowinskiK commented 1 year ago

There is something wrong in configuration file located in $RootFolderConfig, I guess. Did you try to validate the file before?

zameer712 commented 1 year ago

You were Right @NowinskiK Thanks for the heads up

Closing this discussion as issue got resolved