Get in touch with us with your business problem and we’ll consult you on the suitable service solution.
Learn more about our HireDynamicsDevelopers portal and the team behind it.
Read successful stories from our clients across various industries.
Find the right service according to your specific business needs.
Get in touch with us with your business problem and we’ll consult you on the suitable service solution.
Learn more about our HireDynamicsDevelopers portal and the team behind it.
Read successful stories from our clients across various industries.
Find the right service according to your specific business needs.
Updated: December 17th, 2024 by Ivan Farafonov
When dealing with multiple instances of Dynamics 365, it becomes paramount to incorporate source control for the unmanaged solutions under development, along with implementing simple CI/CD solutions for smooth transfers. Failing to do so could result in version and content discrepancies across environments, the emergence of undesirable active customizations, and potential future complications with customizations and data import.
Fortunately, Microsoft has taken significant strides by providing all the necessary tools and comprehensive documentation to delegate the CI/CD process of Azure DevOps Dynamics 365 CI/CD. This effectively mitigates the aforementioned issues, while offering a more controlled and convenient migration process. These features allow you to stay in sync, reduce risks, and foster a smoother workflow in your Dynamics 365 endeavors. Need help with all features? Meet Kyrylo, a talented developer working on a large project for a leading telecommunications company in the USA.
Kyrylo is part of a skilled team of Microsoft Dynamics 365 developers who work closely with Product Managers, Business Analysts, and other specialists. They use a Waterfall methodology to control projects efficiently from requirement analysis to deployment. The team uses technologies like C#, .NET, JavaScript, TypeScript, React.js, Next.js, and Kendo UI to create a smooth user experience.
He works with the leading USA company. It specializes in global telecom integration and has an award-winning platform that combines CRM, ERP, and IoT elements. Serving over 7 million subscribers worldwide, the company is dedicated to reducing operating costs and improving service quality for telecom providers.
Kyrylo is happy to share his knowledge and reveal insights into the CI/CD process. Let’s dive into a minimal example that will serve as your launchpad. To get started, you’ll require the following essentials:
Hire Dynamics consultants to implement simple CI/CD solutions in your workflows!
The CI CD pipeline for Dynamics 365 unfolds as follows:
In a nutshell, the developer does the first three manual parts of the Dnamics 365 continuous integration: making changes and committing them to Azure DevOps. On the other hand, Azure DevOps automates the following tasks.
The next step is to export and unpack it. While this process can be done manually, you can take it a step further and achieve automation using PowerShell and CMD scripts. In fact, I have created a .NET console application that handles the export and unpacking processes.
Let’s begin by using a PowerShell script to download the desired option. To get started, make sure you have the Microsoft.Xrm.Data.Powershell package installed, as it plays a crucial role in authenticating and interacting with Dynamics:
Install-Module -Name Microsoft.Xrm.Data.Powershell
Next, we will download the solution:
Finally, unpack the solution into the source control folder using the Solution Packager Tool:
SolutionPackager.exe /action:Extract /zipfile:mysolution_1_1_0_0_managed.zip /folder:source /allowDelete:Yes
I recommend using the following structure for your source solution:
In this exemplary setup, the project structure is organized into various components to streamline the CI/CD process for Dynamics solutions. Here’s a breakdown of the different components and their roles:
This project houses the plugins developed and intended for publishing to the Dynamics instance.
Once the source code for the solution has been published, the Build pipeline on Azure DevOps plays a crucial role in ensuring the integrity of the solution. This pipeline is responsible for building the solution from the source code and pushing it to Artifacts, where it can be easily managed and deployed. To leverage this functionality in your DevOps instance, you’ll first need to install the Power Platform Build Tools from the Azure Marketplace.
You have the option to utilize snippets for creating and pushing the features, and for more extensive customization, custom YAML scripts can be employed. The simplest example involves three essential steps:
By following these three steps, your line is well-equipped to handle the publishing process.
Now, you need to create a network. Go to Azure DevOps and navigate to the “Releases” section, then create a new channel. In the editor, click on “Add an artifact” to specify the source from which the release will be triggered. Choose the appropriate pipeline that you previously created as the source of your artifact. This ensures that whenever a new build is available, it triggers the system. After adding the artifact, go to the “Continuous Deployment Trigger” section for the artifact. Enable the trigger on the specific system you want to use. This means that whenever a new build is available, the line will automatically start.
In Stage 1, you will create a new job and add four tasks to achieve the following:
After setting up your CI/CD pipelines, it’s time to put them to the test. In your Dynamics 365, make some changes to features that you want to test. Export the unmanaged solution either using the script you previously set up or manually through the Dynamics 365 interface. Use the Solution Packager to unpack the exported file into the code. Commit the changes to the code to your Azure DevOps repository.
The option will be built using the Power Platform Build Tools and published as an Artifact. The network should be automatically triggered after the pipeline successfully creates the Artifact. The line will import the item into the space using the configured service connection and credentials. Keep an eye on the line as they execute. Check the logs and outputs to ensure that there are no errors or issues.
Once the release is complete, check your target Dynamics 365 environment to confirm that the feature has been imported successfully and that any customizations are correctly published.
If all the steps are executed without errors and the environment reflects the changes you made, congratulations! Your CI/CD setup is working as expected. Now you can enjoy a streamlined and automated deployment process with minimal manual intervention.
Our developers are the best assistants if you need help in implementing simple CI/CD solutions. We provide reliable assistance and configure the required functionality quickly and efficiently. With this approach, you avoid lengthy coding and just enjoy the result. At the same time, you can be calm about the quality of execution, because our specialists adjust everything according to your requests. Just contact us to choose suitable services and get a fast and smooth implementation.
Outline
Roman U.
40 HOURS / WEEK
Alexandre C.
10 HOURS / WEEK
Artem A.
20 HOURS / WEEK