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 117 forks source link

Question: Can you share your CI/CD setup? #232

Open FixRM opened 5 years ago

FixRM commented 5 years ago

Hello guys,

Can you share how do you do CI/CD on your D365 projects? I understand how the tools are working, but like to know a successful implementation story. Main areas of interest are:

So I'm interested in everything around the tools :) Also it will be cool to know about challenges and how do you handle them. May be somebody has "never do it this way" story? Any help is appreciated.

mgr1054 commented 5 years ago

Hey, you might want to check out this Whitepaper published by Micrsoft. It describes a lot of patterns and approaches for D365 Solution Lifecycles.

https://www.microsoft.com/en-us/download/confirmation.aspx?id=57777

FixRM commented 5 years ago

Thank you @mgr1054, I thought it was useless document I already saw, but it looks like it is updated version. Thank you!

mgr1054 commented 5 years ago

The other day I had an idea for a deplyoment trigger. What do you guys think about implementing a Custom Button in Dynamics 365, where you would take the Id of the selected Solution and call the Azure DevOps REST API in order to start the build Pipeline? It seems pretty convinient to me.

FixRM commented 5 years ago

@mgr1054, I don't think it is a good idea. The whole idea behind CI/CD is to store solution in repo and be able to build any version at any time. But you are talking about automating of moving solution between environments. There is XrmToolbox plugin for that already, so you definitely don't need something in CRM or TFS for this

mgr1054 commented 5 years ago

My goal is to minimize the effort for a developer (developing online by clicking in the ui of crm dynamics365) of deploying a new patch from dev to stage. It's hard to go the common way of ci, if there's no interaction between the developer and the repo in this use case.

FixRM commented 5 years ago

It's clear but Azure DevOps is designed to be code-driven. As already mentioned you it is easier to XrmToolbox or PS scripts for this task than involve Azure DevOps here.

malaker commented 4 years ago

In our case we have one shared development environment where we doing customizations. Once customization to the unmanaged solution is done then developer is extracting changes to code via packager. You can extract and unpack changes to code using the tool. Since we work in shared environment developer has to pick his changes and then commit to feature branch - its needed because not necessarily other developers finish the work.

From code repository we build manage solution by firstly copy empty environment to "stage" environment. For this part we have custom code written. Microsoft has something called Microsoft Xrm OnlineManagement Api that can be use to automate that part. Then to stage environment we import unmanaged solution. After that we can export managed solution which can be install on target environment.

don-matese commented 3 years ago

I have a shared environment and hooked in listener on the Solution Version number change event. That kicks off an export, unpack (into source control), build and deploy to test