About PowerApps Portals Build ToolsThis tool empowers developers to enable CI/CD (Continuous Integration/Continuous Deployment) of portal configuration. You can use this tool to check-in the portal configuration to source control and move portal configuration to any environment using Power Apps CLI. For more details about Power Apps CLI support for Power Apps Portal. You can check these articles:
Steps to configureStep 1 - Install the extension in your Azure Devops Instance
Step 2 - Portal Tool InstallerPortal Tool Installer task is used to install all prereusites softwares and tools like npm, node.js etc in Azure Devops VM. These tools and softwares are required to connect, authenticate, download and upload the portal data from/to your Power Platform environment. Step 3 - Export Portal ConfigurationExport Portal Configuration task is used to export(download) the portal configuration (form, list, webpages, content snippet etc) from your Power Platform environment and store it in the source control. In order to use this task in your build pipeline(CI), You need to pass some mandatory information like D365 instance URL, application Id, client secret, tenent id, website id and the folder path of your source control where you want to save the portal configurations. Here are the mandatory details that you need to provide:
Important Note: I have used Output variable in order to pass the Exclude data value to the next step of the pipeline. Hence, set the reference name (portal) of the output variable as per the shown in the following screenshot. Step 4 - Commit data to source controlOnce you export the portal configuration, it is currently available on your Azure DevOps virtual machine. You need to commit that data to your source control in Master branch. To do that, you should add a Powershell task and add the following script. Note: In git add command (4th line in the script, as shown below), give the folder path where you want to store the portal configuration in repository Step 5 - Powershell script - Exclude data from exportThis script has a logic to remove the portal component folders from the repository that you don't want to migrate to the target instance. To manage this, i have created 2 folders (Portal-Source and Portal-Deployment) in my repository. Portal-Source folder holds the complete portal data export and Portal-Deployment folder holds only selected portal data export (that i want to import). Currently, there is no way in PowerApps CLI to do the increamental or selective portal component deployment. The only alternative, i found is to remove the corresponding folder of a particular portal component. git config --global user.email "arpit.crmconsultant@gmail.com" git config --global user.name "Arpit Shrivastava" $tables = $(portal.ExcludedTables); $lists = $tables.split(","); Write-Output $lists foreach($l in $lists) { git rm -r Power-Platform-Solution\Portal-Deployment\starter-portal$l Write-Output $l removed... } git add . git commit -a -m "removed folder" git push origin master Step 6 - Publish ArtifactThis step is used to store the build artifacts to the staging directory. Please point 'Path to publish' field value to the folder, where you are storing the selective portal data export in the repository. Step 7 - Create Deployment ProfilePlease read the following articles to know what is the significance of using deployment prifiles and how to use it:
You need to manually create the deployment profiles inside the folder containing the portal content (see below). In the below example, I have to deploy the portal to SIT, UAT and PROD environment. Therefore, I have created 3 different deployment profiles. Note: Deployment profiles needs to be created only one time. From next time onwards, you may only required to change its content (if required). Step 8 - Import Portal Configuration (Use it in Release Pipeline)Import Portal Configuration task is used to import(upload) the portal configuration (form, list, webpages, content snippet etc) to your Power Platform environment. In order to use this task in your release(CD) pipeline, You need to pass some mandatory information like D365 instance URL, application Id, client secret, tenent id and the folder path of your source control where you have exported/stored the portal configurations. Here are the mandatory details that you need to provide:
Support and ContactFor any support and assistance, you can connect me through following channels: |