CI/CD & Git Integration
A practical deep dive into source control, promotion, branching, and automation for Microsoft Fabric.
Data Engineer Platform Owner DevOps Engineer โ This page is for teams designing repeatable release processes for notebooks, pipelines, semantic models, reports, and other Fabric items.
CI/CD in Microsoft Fabric is about moving from one-off workspace edits to a controlled delivery model. Instead of treating a workspace as the only source of truth, teams use Git to version item definitions and use promotion workflows to move approved changes across environments. That creates a traceable path from development through validation to production.
This matters because Fabric projects often combine many artifact types โ notebooks, data pipelines, lakehouses, warehouses, semantic models, and reports โ owned by different contributors. Without version control and promotion discipline, it becomes hard to understand what changed, who changed it, which version is running in production, and how to safely roll forward when releases happen quickly.
Fabric lifecycle management typically rests on two pillars. Git integration gives you source control, branching, pull requests, and auditability. Deployment pipelines give you environment promotion, stage comparisons, and deployment rules. Mature teams often use both together: Git for authoring and review, then deployment pipelines or APIs for controlled promotion.
๐ Pillar 1: Git Integration
Use GitHub or Azure DevOps to store Fabric item definitions as files, enable reviews, and collaborate through branches and pull requests.
๐ Pillar 2: Deployment Promotion
Promote approved changes through Dev, Test, and Prod using Fabric deployment pipelines or automation built on Fabric REST APIs.
๐งพ Operational Benefits
Version control improves reproducibility, collaboration, rollback readiness, compliance evidence, and deployment traceability across environments.
Git Integration
How Fabric workspaces sync to repositories and what actually lives in source control.
Fabric Git integration connects a workspace to a repository branch and serializes supported items into source files. In practice, that means the workspace remains the authoring surface while the repository becomes the durable system of record for item definitions. Users can commit from the workspace to the repo, pull updates from the repo into the workspace, and inspect changes before syncing.
Supported Git providers are Azure DevOps and GitHub. The connection is made at the workspace level, then pointed to a repository and branch. Once connected, teams can decide whether developers work directly on a shared branch, on feature branches through pull requests, or on environment-specific branches that each map to a different workspace.
What gets versioned is the metadata and definition of supported Fabric artifacts: notebooks, pipelines, semantic models, reports, SQL objects, and other item definitions. What does not get versioned is equally important: data in lakehouses or warehouses, Fabric capacity settings, workspace permissions, and many broader tenant or environment settings remain outside Git and must be handled separately.
Setup Flow
Connect the workspace to Git โ choose the repository โ select the target branch โ review pending changes โ sync the workspace and repo.
Commit or Update
Commit pushes workspace changes to Git. Update pulls repository changes into the workspace. Teams can use manual sync for control or auto-sync for faster alignment.
Conflict Handling
When both sides changed the same definition, Fabric surfaces a conflict and requires reconciliation before sync. Resolve it in Git or the workspace, then repeat the sync from a clean state.
Treat Git as the canonical history for item definitions. Even if authors work mostly in the Fabric UI, require changes to be committed, reviewed, and merged before they are considered release-ready.
| Versioned in Git | Not Versioned in Git |
|---|---|
| Notebook code and metadata | Lakehouse and warehouse data |
| Pipeline JSON definitions | Capacity assignment and sizing |
| Semantic model definitions | Workspace permissions and admin settings |
| Report definitions such as PBIR | Secrets stored outside source files |
| Warehouse SQL objects and item metadata | Operational runtime state and refresh history |
Branching Strategies
Choose a Git model that matches your team size, release cadence, and governance needs.
There is no single best branching model for every Fabric team. The right choice depends on how many developers work in parallel, how often you release, how much isolation each environment needs, and whether approvals happen in Git, in release orchestration, or both. Fabric can support environment branches, feature branches, or a trunk-based approach, provided workspaces and promotion rules are mapped consistently.
Branching decisions also shape how conflict resolution and rollback work. More branches usually give better isolation and governance, but they increase merge overhead and coordination. Fewer branches simplify flow, but they demand stronger discipline around pull requests, testing, and deployment controls.
As a rule of thumb, small teams with frequent releases often do well with trunk-based development. Larger teams with several parallel initiatives usually benefit from feature branching. Environment branching can work well in regulated or highly controlled estates where each workspace maps directly to a long-lived branch.
| Strategy | How it Works | Pros | Trade-offs | Best Fit |
|---|---|---|---|---|
Environment branchingmain โ staging โ dev |
Each environment maps to a branch and a workspace. Promotion happens by merging changes forward across environment branches. | Clear environment traceability, easy branch-to-workspace mapping, strong release control. | More merge management, slower flow, higher risk of branch drift. | Regulated teams, strict release governance. |
| Feature branching | Developers branch from dev or main, work independently, then open pull requests back into the shared integration branch. |
Good isolation, easier code review, safer parallel development. | More PR churn and merge overhead, integration can bunch up late. | Larger teams with multiple concurrent workstreams. |
| Trunk-based | Everyone integrates into a single main branch frequently, while deployment pipelines or release controls manage promotion across workspaces. | Simple model, fast integration, less branch divergence, great for continuous delivery. | Requires high discipline, fast reviews, and solid test gates. | Small to medium teams with frequent releases. |
Small team: prefer trunk-based with strong PR checks and deployment pipelines for promotion. Large team: prefer feature branching with a protected integration branch and explicit promotion to test and production workspaces.
Deployment Pipelines
Fabric's built-in stage-based promotion model for moving content from Dev to Test to Prod.
Deployment pipelines are Fabric's native promotion feature for moving content through environments such as Dev โ Test โ Prod. A pipeline gives you stage-aware comparisons, selective deployment, and deployment rules so that one logical solution can be promoted while still adapting to differences between environments.
The core value of deployment pipelines is separation of authoring from promotion. Developers can work in a development workspace and validate their changes there. When ready, those changes are deployed forward into higher stages, where connection bindings, parameter values, or environment-specific references can differ without forcing a separate manually maintained copy of each item.
Deployment pipelines complement Git, but they are not the same thing. Git manages source history, branching, and review. Deployment pipelines manage stage progression and environment rules. Some teams use Git for all promotion logic; others use Git only in development and rely on deployment pipelines for controlled movement to test and production.
Create the Pipeline
Start a deployment pipeline, define stages, and name them clearly for Dev, Test, and Prod or for any expanded release path your organization uses.
Assign Workspaces
Map a dedicated Fabric workspace to each stage. Keep one workspace per environment to avoid accidental edits and cross-stage contamination.
Deploy with Rules
Review differences, configure deployment rules and parameter overrides, then deploy to the next stage with repeatable settings.
| Approach | Strength | Watch Out For | Use When |
|---|---|---|---|
| Deployment pipelines | Visual stage management, controlled promotions, deployment rules. | Not a substitute for source control or branch policy. | You want clear Dev/Test/Prod promotion inside Fabric. |
| Git-based promotion | Everything flows from Git history and pull requests. | Environment config and dependency ordering may require more custom automation. | You want code-first CI/CD and Git as the primary governance plane. |
| Combined model | Git for authoring and review, pipelines for stage promotion. | Needs clear ownership to avoid duplicate release paths. | You want both source-control rigor and native Fabric promotion. |
1) Create the deployment pipeline. 2) Assign Dev, Test, and Prod workspaces. 3) Configure deployment rules and stage-specific overrides. 4) Validate in the target stage. 5) Promote only after sign-off and operational checks pass.
Variable Libraries
Variable libraries (preview) provide centralized configuration management for deployment pipelines. Instead of hard-coding connection strings, capacity references, or environment-specific parameters across Dev/Test/Prod, you define them once in a variable library and reference them from Fabric items.
๐ฆ What They Solve
- No more hard-coded configs โ connection strings, server names, and database references are defined centrally, not scattered across items
- Environment switching โ one variable library per stage (Dev, Test, Prod) with stage-appropriate values
- Secrets management โ sensitive values (passwords, keys) are stored securely and not exposed in item definitions
- Reduced deployment errors โ eliminates manual find-and-replace of environment values during promotion
โ๏ธ How to Use
- Create a Variable Library item in your workspace
- Define variables as key-value pairs (e.g.,
SQL_SERVER,STORAGE_ACCOUNT,LAKEHOUSE_ID) - Reference variables in supported Fabric items using
{{variable_name}}syntax - Create separate libraries per environment stage or use deployment rules to override values per stage
- When deploying via pipelines, the correct variable values are resolved automatically for each stage
Variable libraries work with Data Pipelines, Notebooks, and Dataflows Gen2. Support for additional item types is being added progressively. Check the latest documentation for current connector/item coverage. Variable libraries integrate with both deployment pipelines (stage-based) and Git-based CI/CD (branch-based) promotion models.
CI/CD Automation
Use APIs, service principals, and pipelines to move from manual releases to repeatable deployment workflows.
Fabric automation is built around REST APIs that let you interrogate workspaces, manage items, coordinate Git sync actions, and drive deployment pipelines programmatically. In a mature operating model, your pipeline tooling does not manually recreate artifacts through the UI; it uses repository contents, Fabric APIs, and environment configuration to deploy the right definitions in the right order.
Authentication for non-interactive automation should use a service principal with the minimum permissions required for the target workspaces and deployment pipeline actions. This makes deployments repeatable and auditable while avoiding dependence on a human user's token. Secrets should live in a secure store such as Azure Key Vault and be injected into the pipeline runtime rather than embedded in notebooks or YAML.
Keep in mind that CI/CD for Fabric has an infrastructure layer as well as an application layer. Capacities, network controls, identities, and related Azure resources typically sit outside Fabric item deployment and are better provisioned via Terraform, Bicep, or other infrastructure-as-code tooling. That separation prevents release pipelines from becoming an ad hoc infrastructure management system.
Key API Areas
Common automation flows touch workspace APIs, item APIs, Git integration APIs, and deployment pipeline APIs for promotion between stages.
Authentication Model
Use a service principal for unattended releases, scoped to the specific workspaces and resources your automation actually manages.
Infrastructure Layer
Provision capacities, networking, and supporting Azure resources through Terraform or Bicep, then deploy Fabric item definitions separately.
name: Deploy Fabric
on:
push:
branches: [ main ]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Azure login
uses: azure/login@v2
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- name: Install dependencies
run: pip install requests
- name: Trigger Fabric deployment
env:
FABRIC_WORKSPACE_ID: ${{ secrets.FABRIC_WORKSPACE_ID }}
FABRIC_PIPELINE_ID: ${{ secrets.FABRIC_PIPELINE_ID }}
run: |
python scripts/deploy_fabric.py
trigger:
- main
pool:
vmImage: ubuntu-latest
steps:
- checkout: self
- task: AzureCLI@2
inputs:
azureSubscription: Fabric-Service-Connection
scriptType: bash
scriptLocation: inlineScript
inlineScript: |
python -m pip install requests
python scripts/deploy_fabric.py \
--workspace $(FABRIC_WORKSPACE_ID) \
--pipeline $(FABRIC_PIPELINE_ID)
env:
FABRIC_TENANT_ID: $(FABRIC_TENANT_ID)
FABRIC_CLIENT_ID: $(FABRIC_CLIENT_ID)
FABRIC_CLIENT_SECRET: $(FABRIC_CLIENT_SECRET)
Never store client secrets, connection strings, or environment-specific secrets directly in notebook source or repository files. Use Azure Key Vault, secure pipeline variables, and least-privilege identities.
Item Development Lifecycle
Different Fabric artifacts behave differently in Git, so your review and promotion patterns should reflect that.
Not every Fabric item produces the same Git experience. Some artifacts are naturally diff-friendly and easy to review in pull requests, while others generate larger or more metadata-heavy definitions that need stronger conventions. Understanding those differences helps teams decide when to rely on code review alone and when to add environment validation or additional smoke testing.
Review quality also improves when each item type has its own standards. Notebook changes should be reviewed like code, report changes should be paired with visual validation, and semantic model changes should include explicit checks for measure behavior, relationships, and calculation logic. In other words, the CI/CD flow may be shared, but the definition of done differs by artifact type.
The table below summarizes common Git behavior for core Fabric item types and highlights deployment considerations that matter during promotion.
| Item Type | How It Behaves in Git | Deployment Tip |
|---|---|---|
| Notebooks | Full code versioning and generally diff-friendly text content. | Keep notebooks parameterized and avoid environment-specific paths in source. |
| Data Pipelines | Stored as JSON definitions with activities, dependencies, and parameters. | Use parameter overrides for environment-specific connections and endpoints. |
| Semantic Models | TMDL-based definitions improve reviewability, though support may still vary by scenario. | Validate relationships, measures, and refresh behavior in a test stage before promotion. |
| Reports | PBIR format is much more source-control friendly than opaque report packages. | Pair Git review with visual smoke tests to catch layout or binding regressions. |
| Lakehouses | Metadata is versioned, but the actual data is not. | Treat data movement, seeding, and shortcuts as deployment concerns outside Git history. |
| Warehouses | T-SQL definitions can be versioned like other database code. | Apply schema changes in a controlled order and test backward compatibility where needed. |
Notebook Tip
Favor modular functions and parameters so notebook diffs stay focused on logic, not environment rewrites.
Pipeline Tip
Use reusable parameter conventions for connections, paths, and target item IDs across environments.
BI Tip
For semantic models and reports, combine pull request review with validation in a staging workspace before approval.
Best Practices
Guardrails that keep Fabric releases predictable, reviewable, and safe.
The best Fabric CI/CD designs are intentionally boring: they minimize surprises, separate environments clearly, and make it obvious which path a change must follow before it reaches production. Teams get into trouble when development shortcuts become normal operating practice โ for example, making emergency edits straight in production, bypassing pull requests, or storing credentials in notebook code.
A strong baseline starts with distinct development, test, and production workspaces, protected Git branches, and automation identities that are not tied to an individual contributor. From there, teams improve reliability by documenting operational runbooks, tagging releases, monitoring deployments, and requiring review and validation before promotion.
The following practices are especially important in Fabric because item definitions, workspace promotion, and environment-specific settings often span both analytics engineering and platform operations.
Environment Hygiene
- Use separate workspaces for dev, test, and prod.
- Never edit directly in the production workspace.
- Test in staging before promoting to production.
Change Control
- Use pull request reviews for all changes.
- Tag deployments for traceability.
- Document deployment runbooks and rollback steps.
Security & Automation
- Use service principals for automated deployments.
- Store secrets in Azure Key Vault, never in notebooks.
- Monitor deployment success and failure signals.
If a production change cannot be traced to a branch, a pull request, a deployment record, and a responsible approver, treat that as a process gap to fix โ not as a normal exception.
Resources
Official Microsoft documentation for planning, implementing, and automating Fabric CI/CD.
Use the official documentation as the reference point for feature support, API behavior, and rollout guidance. Fabric CI/CD capabilities continue to evolve, especially around item coverage, API support, and source-control-friendly formats such as TMDL and PBIR.
For most teams, the best reading order is: start with Git integration to understand repository sync, then deployment pipelines for promotion mechanics, and finally the REST API guidance for automation and orchestration patterns.