WaelHamze / xrm-ci-framework

xRM CI Framework provides you with the tools automate the build and deployment of your CRM Solution. Using the framework to implement a fully automated DevOps pipeline will allow you to deploy more frequently with added consistency and quality.
MIT License
186 stars 116 forks source link

Import Configuration Migration Data Issue -Does not Import #273

Open saiankith-explorer opened 4 years ago

saiankith-explorer commented 4 years ago

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 !

WaelHamze commented 4 years ago

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

saiankith-explorer commented 4 years ago

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 commented 4 years ago

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