Azure Introduction :-

In a prior blog post, I discussed about How To Deploy Dynamics 365 Solutions Using CI/CD With Azure Pipelines And Check-In Extracted Solution Files With Azure(Git) Repo By Creating Local Branch Automatically

In this blog i am going to explain the step by step process to create Dynamics 365 Solutions package by using CI/CD Pipelines With Azure DevOps

After run the pipeline automatically generate the new branch

Check-In Extracted Solution Files With Azure(Git) Repo in that new branch (i.e.’CRMONCE/282′) and then click on the ‘create pull request’

And select the source branch (i.e.’CRMONCE/282′) and Target branch(i.e.’Develop’) and then click on create 

Azure devops

And click on complete > complete merge (the changes will merged to the target branch )

And After merged changes to target branch  (Interface is given below screenshot)

Create Build Pipeline :-

Create a new Pipeline with Classic Editor>Empty Job

Add the task Update Version and paste the below script

#Updates Version to Buildpipeline number
cd $(Build.SourcesDirectory)
#for updating version
$content = [System.IO.File]::ReadAllText(“$(Build.SourcesDirectory)\CRMSolution\Other\Solution.xml”)-Replace(“<Managed>0</Managed>” , “<Version>$(Build.BuildNumber)</Version>”)
[System.IO.File]::WriteAllText(“$(Build.SourcesDirectory)\CRMSolution\Other\Solution.xml”,$content)

Add the task Power Platform Tool Installer

Add a task Power Platform Pack Solution

Source Folder of Solution to Pack -Select Folder by clicking 3 dots

Solution Output File – $(Build.StagingDirectory)\CRMSolution\UnManaged\$(Build.BuildNumber)\CRM_Solution.zip

Type of Solution -Unmanaged

 Add a task -Copy Files

Source Folder – $(Build.StagingDirectory)\CRMSolution\UnManaged\$(Build.BuildNumber)\CRM_Solution.zip

Contents -**

Target Folder – $(Build.ArtifactStagingDirectory)

Add a task Publish build Artifact

Path to publish – $(Build.ArtifactStagingDirectory)

Artifact Name – drop

Add a task Power Platform Pack Solution – Managed

Add a task Power Platform Pack Solution

Source Folder of Solution to Pack -Select Folder by clicking 3 dots

Solution Output File – $(Build.StagingDirectory)\CRMSolution\UnManaged\$(Build.BuildNumber)\CRM_Solution.zip

Type of Solution – Managed

Add a task -Copy Files

Source Folder – $(Build.StagingDirectory)\CRMSolution\UnManaged\$(Build.BuildNumber)\CRM_Solution.zip

Contents -**

Target Folder – $(Build.ArtifactStagingDirectory)

Add a task Publish build Artifact

Path to publish – $(Build.ArtifactStagingDirectory)

Artifact Name – drop

Save and Queue the Build Pipeline

finally we can see the Published Artifacts

Reference Video :-

For any help or queries contact us on info@crmonce.com or +91 9014146800

We have started a new online retail store    Please Visit.