This simple multi-stage YAML pipeline packs a PowerApps model-driven app (Dynamics 365 CRM/CE) solution from source control (Assumes an unmanaged solution has been unpacked using SolutionPackager and stored in source) and runs it through an intermediate build environment to create a managed solution artifact. The output artifact is then run through a deployment job with an Azure Pipeline Environment specified that allows us to track deployments to the specified target environment.
Reference the PowerApp Build Tools Lab for directions on setting the pipeline up using the classic editor. The YAML in this gist follows the same steps as the classic editor setup used in the labs but adds more variables to the mix.
Check out the D365 CE Pipelines repo for templated pipeline examples.
SolutionContentDirectory - The path to your solution contents directory e.g. unpacked-solutions/myApp/.
SolutionName - The desired output name of your solution e.g myApp.
BuildEnvironment - The service connection name reference for the environment that will be used in the process of creating a managed solution.
TargetEnvironment - The service connection name reference for the environment that we want our managed solution artifact to be deployed to.
- PowerApps Build Tools - https://marketplace.visualstudio.com/items?itemName=microsoft-IsvExpTools.PowerApps-BuildTools
- PowerApps Build Tools Lab - http://aka.ms/ppalmlab
- SolutionPackager - https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/developer/compress-extract-solution-file-solutionpackager
- Service Connections reference - https://docs.microsoft.com/en-us/azure/devops/pipelines/library/service-endpoints?view=azure-devops&tabs=yaml
- Azure DevOps YAML - https://aka.ms/yaml