This repository is a compilation of various other repositories from Microsoft experts and the community, along with documentation from Microsoft Learn, forums, and articles. It demonstrates the use of a CI/CD scenario for Microsoft Power BI PRO projects by utilizing fabric-cli and GitHub Actions.
The scenario envisions a project where, after deployment, the solution is distributed across multiple tenants—each with its specific data source and user configuration—making it ideal for ISVs (Independent Software Vendors) who build SaaS applications for their customers, as shown in option 4 of the documentation.
- Sample by Rui Romano: https://github.com/RuiRomano/fabric-cli-powerbi-cicd-sample
- Sample by Aitor Murguzur: https://github.com/murggu/fab-demos/tree/main/fab-cli-tutorial-lakehouse
- Choose the best Fabric CI/CD workflow option for you: https://learn.microsoft.com/en-us/fabric/cicd/manage-deployment
- fabric-cli docs: https://aka.ms/fabric-cli
- Fork this repo
- Configure required GitHub secrets
Name | Value |
---|---|
FABRIC_CLIENT_ID | Service Principal Client ID from Entra App ID |
FABRIC_CLIENT_SECRET | Service Principal Secret from Entra App ID |
FABRIC_TENANT_ID | Tenant ID |
ISV_TENANT_A | FABRIC_CLIENT_ID|FABRIC_CLIENT_SECRET|FABRIC_TENANT_ID |
ISV_TENANT_B | FABRIC_CLIENT_ID|FABRIC_CLIENT_SECRET|FABRIC_TENANT_ID |
ISV_TENANT_C | FABRIC_CLIENT_ID|FABRIC_CLIENT_SECRET|FABRIC_TENANT_ID |
If you run locally, configure same secrets on your environment variables and install the fab-cli
with:
$ pip install ms-fabric-cli
-
Configure the file
config.json
with ids by branch.- The adminUPNs are the Object ID of the Entra User Principal Name.
-
Configure the file
config-isv.json
with ids for each tenant.
- The PBIP files are saved in the
src
folder with the extensions*.Report
and*.SemanticModel
. - Deploying new versions is done on the
dev
branch. - On every push to
dev
, the GitHub Actions pipeline is triggered, deploying to the*-DEV
workspace with the name and data source specified inconfig.json
. - Once the development phase is complete, a pull request is created for the
staging
branch, where the pipeline triggers deployment to the*-STG
workspace and also runs the best practices analysis pipelinebpa.yml
. This process utilizes community tools such as Tabular Editor and PBI-Inspector. - Once the project is approved, a pull request is created for the
main
branch, where the pipeline will deploy the version to all tenants specified inconfig-isv.json
.
- If you would like to help fund or sponsor the project, you can do via 💗 GitHub Sponsors or yet via YouTube.
- This is just one suggested approach in a world of countless possibilities and diverse structures.
You can and should use this repository as inspiration and a technical foundation to build more sophisticated and robust pipelines if needed for your application. If you are a dev and discover issues or alternative ways, submit your pull requests to apreciation if you wish to contribute with code for the project. - Other ways to contribute are by helping people out with support on our forums or in our community. You can access them on the below links.