The basis of this guideline and process assumes you have already configured and setup the necessary Power BI Service Principal, if you haven't yet, you can find a guide on how to setup a service principal here: Power BI - Setting up a service principal and an application secret

Release configuration

Automatic release on pull requests

Navigate to the Pipelines > Releases section of Azure DevOps

Click “New” and select “ + New release pipeline”

A new release pipeline screen will appear, click “Empty Job”

Name the stage the Power BI Workspace name

Name the new pipeline after the general name of repository or group name:

Artifacts Panel

Click “Add an Artifact”

Select “Azure Repos”

Fill out the repository and branch specifics, then click “Add”

Click on the “continuous deployment trigger” icon

Enable the trigger and specify a branch filter to only include the branch you specified, then close this popup

Stages Panel

Click on the job and name it the workspace you want to automatically deploy to when you perform a pull request (often a dev or test workspace), if you haven't do so already

Click on the job link

Click “+”

In the Add Tasks panel, search for “Power BI Actions” and click “Add”

For each PBIX file, click on the “Power BI Action: Publish” now displayed under the Agent Job

Fill out the Power BI Actions job, putting the display name as the name of the pbix file, selecting the Service Principal, Workspace and Source file (as similar to below),

Finally click “Save”

If you like and have set up some folders, select the folder, then click “OK”

Manual release process for production deployment (pre-approvals)

Note

Prior to setting this step up, please ensure that you have a Work Item Query for gate validation, please refer Azure DevOps - Queries

To set up a manual release that is based on an approval framework from managers.

Open the release designer by selecting the relevant release and clicking "Edit"

For the next step to work correctly, ensure the artifact is highlighted eg:

Under stages, select "Add" and then select "+ New stage". If you see "Clone Stage" as black, you have a stage highlighted and this will create the item in the wrong place.

Name the stage after the Power BI workspace you are deploying to

Click the icons on the left to configure pre-deployment conditions

Enable the Pre-deployment approvals and then add the necessary people and whether multiple or any one of the people can approve the deployment

Enable the Gates option and configure as below, selecting the relevant work item query you created earlier

Click on the job link

Click “+”

In the Add Tasks panel, search for “Power BI Actions” and click “Add”

For each PBIX file, click on the “Power BI Action: Publish” now displayed under the Agent Job

Fill out the Power BI Actions job, putting the display name as the name of the pbix file, selecting the Service Principal, Workspace Name and Source file (as similar to below),

Finally click “Save”

If you like and have set up some folders, select the folder, then click “OK”

Setting the retention policy

To set the retention policy, open the release designer by selecting the relevant release and clicking "Edit"

Select "Retention" in the tab display

For each item, set the "Days to retain a release" and "Minimum releases to keep" to the same values. For our example we set it at 14 days which aligns with the iteration cycle.

Finally click “Save”

Start a release for deployment to the Power BI Workspace

UAT / Testing Release

After initially configuring the release in the first part of this tutorial, to manually start a release for deployment select your dashboard release and click "Create release"


Click "Create"

The process will now run and publish the dashboard to the Power BI Workspace

Production Release

Open an existing release by clicking on the release title

On the Pre-approval production stage, click "Deploy"

Add any relevant comments and click "Deploy"

The approvers will have a set amount of time to approve the deployment to production.



  • No labels