zoukankan      html  css  js  c++  java
  • [Azure DevOps Dynamics] Automate CRM Solution Deployment

     

    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.

    DevOps3

    Now we need to install Power Devops Tool by Wael Hamze. Once installed add this in your pipeline.

    DevOps04

    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

    DevOps05

    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

    DevOps15

    Now add Publish Customizations task to publish any changes before exporting the solution. It takes only connection string parameter.

    DevOps16

    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.

    DevOps06

    DevOps07

    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.

    DevOps19

    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.

    DevOps14

    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.

    DevOps13

    Next go to Tasks and add below tasks in Releases.

    1. Add Power Devops Tools installer
    2. Add Ping Environemnt - Provide Connection string of Target Environment
    3. Add Import Solution - Provide Connection string of Target Environment and select Solution file as shown below

    DevOps18

    Once done, Click on Create Release to verify solution Deployment to Target Environment.

    DevOps20

    To downloag Solution Import Log file, Go to Release window and click on Download All Logs.

    DevOps21

    Hope this helps!

  • 相关阅读:
    系统架构师学习笔记_第十一章(下)
    通过IronRuby和C#学习RUBY系列[0]
    TIPS to comment your code
    超级简单:DIV布局
    js 查询XML数据添加到HTML select控件
    《架构之美》读书笔记(一)
    18个不常见的C#关键字,您使用过几个?
    如何成为人尽皆知的C#开发人员
    实现Visual Studio 2010一个很简单的很酷的扩展
    一种简单的直观的高效的权限设计
  • 原文地址:https://www.cnblogs.com/lingdanglfw/p/15192678.html
Copyright © 2011-2022 走看看