标签:DevOps solution Artifact Solution add file Dynamics CRM
In this blog I am going to explain step by step guide to automate CRM solution (Unmanaged/Managed) deployment from DEV to SIT, UAT & Prod. I will use devops to demonstrate this use case.
Login to dev.azure.com-> Create new project
Once project created successfully, Navigate to Pipeline and create new pipeline. Select Use classic editor option.
Once you click on Use Class Editor link, it will open new dialog and select Agent. Azure devops will automatically populate for you. You can use custom built Agent as well.
Now we need to install Power Devops Tool by Wael Hamze. Once installed add this in your pipeline.
Next we have add Ping Environment task from Power Devops Tools to check if Dynamics CRM instance is up and running. We need to provide CRM Connectiong String in below format
AuthType=Office365;Username=username@name.onmicrosoft.com; Password=CRM Online Password;Url=https://CRMORG.crm8.dynamics.com
Then we have to add SetVersion task to set the CRM solution version number based on build number. Click on Options tab and set Build Number with as bewlo format. And use this in Set Version task in Version Number as $(Build.BuildNumber).
1.0.0.$(Rev:r) - Last digit of version number will be dynamically changed for each run.
Check this pagefor Azure Devops predefined variables
Now add Publish Customizations task to publish any changes before exporting the solution. It takes only connection string parameter.
Next add Export Solution Task from power devops tool and provide Connection string as mentioned in above steps and Solution Name which you want to take deploy.
Select whether you want to export managed or unmanaged solution. Also select additional General settings to be exported as part of the solution.
Next add Publish Build Artifact task to publish the solution zip file to Azure pipeling Artifact which will be used by Release to deploy to SIT, UAT & Prod. Select Path to publish as $(Build.ArtifactStagingDirectory) which we have used in export solution task. Publish Build Artifact will copy file from this location to Azure pipeline Artifact.
Pipeline is completed for exporting the solution and publishing the solution file to Artifact. Run this pipeline manually and verify Solution Zip file is published to Artifact.
Create Release to Deploy Solution to Target Environment
Click on Releases from left menu and create new release for UAT. And select Artifact where solution zip file is published.
Next go to Tasks and add below tasks in Releases.
- Add Power Devops Tools installer
- Add Ping Environemnt - Provide Connection string of Target Environment
- Add Import Solution - Provide Connection string of Target Environment and select Solution file as shown below
Once done, Click on Create Release to verify solution Deployment to Target Environment.
To downloag Solution Import Log file, Go to Release window and click on Download All Logs.
Hope this helps!
标签:DevOps,solution,Artifact,Solution,add,file,Dynamics,CRM 来源: https://www.cnblogs.com/lingdanglfw/p/15192678.html
本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享; 2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关; 3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关; 4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除; 5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。