xrm-ci-framework icon indicating copy to clipboard operation
xrm-ci-framework copied to clipboard

Import Configuration Migration Data Issue -Does not Import

Open saiankith-explorer opened this issue 4 years ago • 3 comments

We are facing issues in importing configuration data to Target environment using

Step1: I am using a custom Powershell component to generate the Zipfile for Exporting Configuration Data:

set-ExecutionPolicy Unrestricted Write-Host "Checking out $branch from $url for $gitRequestedFor ($gitRequestedForEmail)."

git fetch $url git checkout master git log --oneline

Write-Host "###########################################################################" cd DataMigration/FieldSales

$Currentdirectory = (Get-Location).path $StagingDir = '$(Build.ArtifactStagingDirectory)'

#Get-ChildItem -Path $Currentdirectory $Datafile = "{0}{1}" -f $Currentdirectory, "\ConfigurationData.xml" #Get-Content -Path $Datafile $Schemafile = "{0}{1}" -f $Currentdirectory, "\ConfigurationSchema.xml" $Contentfile = "{0}{1}" -f $Currentdirectory, "[Content_Types].xml" $Datazipfile = "{0}{1}" -f $StagingDir , "\MigrationData.zip" $Update = $True

$compress = @{ LiteralPath = $Datafile, $Schemafile, $Contentfile CompressionLevel = "Fastest" Update = $Update DestinationPath = $Datazipfile }

Compress-Archive @compress Write-Host "Configuration data merge completed"

This is exporting the zip file and we have confirmed its availability from the artifact. Step 2: I am importing the exported file using Import Configuration Migration Data component

The pipeline runs till it gets timed out. We are stuck here for a while now as there is no valid error or warning. Please point us in the right direction. Thank you very much for your valuable time !

saiankith-explorer avatar May 19 '20 19:05 saiankith-explorer

@saiankith-explorer can you import the same zip file using the Configuration Migration Tool Client? (i.e. UI)

WaelHamze avatar May 19 '20 19:05 WaelHamze

I tried importing through the Configuration Migration Tool Client and it said invalid import file. Looks like the powershell script is not exporting a valid import file.

saiankith-explorer avatar May 20 '20 05:05 saiankith-explorer

Please close this ticket we got this resolved @WaelHamze . Thank you very much for your prompt response

saiankith-explorer avatar May 20 '20 14:05 saiankith-explorer