Here I am explaining a working skeleton of my choice for D365 V9. I am not going in-depth in VSTS (Visual Studio Team Services) online Build and Release process, but explain D365 specific work, which is the focus.
CI for D365 needs utilising of collection of tools together. In this example, I am deploying a Package consist of a Solution as well as a Data file.
1) Package Deployer – to Create Package
Here I am using Package Deployer of D365 SDK. Below Videos explain standard usage of Package Deployer;
a. Create Package: https://www.youtube.com/watch?v=KJKZPu4C-O4
b. Deploy Package: https://www.youtube.com/watch?v=lKt-bPdiBgM&t
Usually, Package is deployed through supplied wizard based steps, but we need to automate the deployment process. Still structure of the package and the way It’s being created remains same.
According to our scenario, we define Package with one Solution and a Data file resulting below Config file;
A couple of points;
• Solution component is required, though data file is optional. Suppose our requirement is to push only the data file, still a dummy solution needs to be there.
• If the Solution is already deployed to D365 and we try to push it with same version, importing of the solution is skipped.
If you want to deep dive in to Package Deployer, please refer below article.
https://msdn.microsoft.com/en-us/library/dn688182.aspx
2) Configuration Migration Tool – to Create Data Files
Configuration Migration tool, supplied by SDK, is to be used to generate the Data file explained in step 1.
This explains how this tool should be used;
https://www.youtube.com/watch?v=_DrDbfRlJZI
3) Prepare VSTS Online
In our, scenario we use xRM CI Framework as an add-in. Below simple steps illustrate how it can be added to VSTS;
a. Browse to Market Place of VSTS
b. Search for Xrm and click Get it free
c.You are done.
4) Build Process
Build definition is simple and consist of only one Task which is Publish Artefact task.
One point to keep in mind is, I have kept package in correct structure in BuildPath folder.
5) Release Process
In Release definition, we use MSCRM Package Deployer task provided by xRM CI Framework. Within the relevant configuration, you will notice how I have pointed the Assembly of the package and Package directory to the build Artefacts we built in previous step.
Anyway, by the time this writting, this works only if Crm SDK Version is set to 8.2. If I find more about this issue or workaround, will publish in this blog in future.
Happy days!.. Releases are happening..
Now your package is pushed to Dynamics 365.