Overview

CI/CD & Git Integration

A practical deep dive into source control, promotion, branching, and automation for Microsoft Fabric.

๐Ÿ‘ค Who is this for?

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.

The Fabric CI/CD platform is broader than Git and deployment pipelines. Fabric REST APIs provide the foundation; Git integration, deployment pipelines, and variable libraries manage source, promotion, and configuration; and tools such as Fabric CLI, Terraform, and fabric-cicd enable repeatable automation from GitHub Actions, Azure Pipelines, or another runner.

๐Ÿ”Œ REST API Foundation

Workspace, item, Git, deployment, access, and job APIs provide the programmatic base used by native and code-first tooling.

๐Ÿ”€ Integration & Delivery

Git integration versions item definitions, deployment pipelines promote releases, and variable libraries separate environment configuration.

๐Ÿ› ๏ธ Developer Tooling

Fabric CLI and fabric-cicd provide scriptable deployment options, while Terraform provisions supporting Fabric and Azure resources.

โš™๏ธ Automation Runners

GitHub Actions, Azure Pipelines, and self-hosted runners execute validation, deployment, configuration, and verification jobs.

Git

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, GitHub, and GitHub Enterprise (cloud-based only). 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.

โœ… Practical Pattern

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 GitNot Versioned in Git
Notebook code and metadataLakehouse and warehouse data
Pipeline JSON definitionsCapacity assignment and sizing
Semantic model definitionsWorkspace permissions and admin settings
Report definitions such as PBIRSecrets stored outside source files
Warehouse SQL objects and item metadataOperational runtime state and refresh history
Branching

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.

Fabric branched workspaces can create a feature branch and an isolated feature workspace from the Fabric experience. Use them when developers need workspace-level isolation, but still apply pull-request, cleanup, capacity, and access policies so temporary workspaces do not become unmanaged environments.

StrategyHow it WorksProsTrade-offsBest Fit
Environment branching
main โ†’ 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.
๐Ÿ’ก Decision Guidance

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.

Promotion

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.

ApproachStrengthWatch Out ForUse 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.
Step-by-step

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 provide configuration as code for supported Fabric items. A library contains variables and value sets that can represent Dev, Test, and Prod values. Each workspace or deployment stage selects an active value set independently, allowing the same library definition to resolve different environment configuration.

๐Ÿ“ฆ What They Solve

  • Configuration reuse โ€” supported items can reference shared values instead of embedding environment IDs and paths
  • Environment switching โ€” value sets provide alternate Dev, Test, and Prod values within the same library definition
  • Reference variables โ€” supported scenarios can point to Fabric items or connections rather than storing raw identifiers in code
  • Reduced deployment drift โ€” the active value set is selected per workspace and isn't overwritten by routine promotion

โš™๏ธ How to Use

  1. Create a Variable Library item in your workspace
  2. Define variables and a default value set
  3. Add alternate value sets whose names align with the release environments
  4. Reference the variables through the supported experience for each consuming item type
  5. Deploy or sync the common library definition
  6. Select the appropriate active value set independently in each target workspace or stage
๐Ÿ” Configuration is not secret storage

Do not treat variable libraries as a replacement for Azure Key Vault or protected runner secrets. Variable-library definitions and value sets participate in Git and lifecycle management. Keep credentials and other secret material in an approved secret store and inject them only at runtime.

Automation

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. Higher-level tools such as Fabric CLI and fabric-cicd reduce the amount of direct API orchestration teams need to maintain.

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.

Fabric CLI

Use the open-source fab command-line interface for scriptable Git sync, item management, and operational automation from CI runners.

fabric-cicd

Use the Microsoft-supported Python library for most code-first deployments from source-controlled Fabric item definitions.

Direct REST APIs

Use APIs directly when a scenario needs custom item orchestration, Git-provider integration, cloning, backup, migration, or unsupported post-deploy behavior.

Terraform & IaC

Provision workspaces, capacities, identities, networking, and supporting resources separately from Fabric item-definition deployment.

GitHub Actions example
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
Azure DevOps pipeline example
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)
๐Ÿ” Security Note

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.

Blueprint

End-to-End CI/CD Automation

A reference architecture for moving source-controlled Fabric solutions through validation, deployment, configuration, and verification.

A complete Fabric release process manages more than item promotion. It provisions environment boundaries, validates item-definition capabilities, authenticates with a workload identity, deploys dependencies in a safe order, applies environment configuration, runs post-deploy operations, and records release evidence.

Release Workflow

1 ยท SourceVersion Definitions

Commit supported Fabric item definitions, deployment code, tests, and environment configuration.

2 ยท ValidateRun CI Gates

Validate source formats, naming, dependencies, parameters, secrets, and item-specific quality checks.

3 ยท ProvisionPrepare Environment

Create or verify workspaces, capacities, identities, connections, and network prerequisites through IaC.

4 ยท DeployPublish Items

Use deployment pipelines, fabric-cicd, Fabric CLI, or REST APIs according to the selected release model.

5 ยท ConfigureComplete Binding

Activate value sets, resolve remaining dependencies, create shortcuts, and apply supported environment mappings.

6 ยท VerifyTest & Record

Run smoke tests, jobs or refreshes, capture results, require approvals, and retain deployment evidence.

Choose the Deployment Mechanism

MechanismPrefer It WhenPrimary StrengthResponsibility You Retain
Git + Deployment PipelinesYou want native workspace authoring and visual Dev/Test/Prod promotion.Integrated comparisons, stages, and deployment rules.CI validation, approvals, unsupported items, and post-deploy jobs.
fabric-cicdGit item definitions are the release source and you want repeatable code-first deployment.Dependency sequencing, parameterization, relationship binding, post-deploy extensions, and optional orphan control.Repository standards, credentials, tests, approvals, and careful deletion policy.
Fabric CLIYou need concise scripts for Git synchronization, item operations, or release runbooks.Filesystem-like command-line automation suitable for common CI runners.Command orchestration, error handling, capability checks, and verification.
Direct REST / Bulk APIsYou need custom Git-provider support, backup or cloning, cross-tenant movement, or specialized orchestration.Maximum control over item definitions and operation ordering.Parameterization, batching, dependency timing, retries, and post-deploy logic.
Terraform or BicepYou are provisioning environment resources and platform boundaries.Repeatable infrastructure and configuration management.Fabric content deployment and item-level validation.

Check Capabilities Before Designing the Pipeline

CI/CD support belongs to each Fabric workspace item type, not to Fabric items as a universal guarantee. Build a release inventory and verify these capabilities for every item type in the solution.

CapabilityWhy It MattersFallback When Missing
Git integrationDetermines whether Fabric can serialize and synchronize the item definition with the repository.Use supported item APIs, external source files, or a workload-specific deployment tool.
Create/update item APIsDetermines whether unattended deployment can create or update the item from its definition.Use deployment pipelines or document a controlled manual step.
Service-principal supportDetermines whether automation can operate without a signed-in user.Do not silently substitute a personal identity; redesign or explicitly govern the exception.
Variable-library supportDetermines whether the item can resolve environment-specific values through shared configuration.Use deployment rules or controlled definition parameterization.
Auto-bindingDetermines whether dependencies reconnect automatically after sync or deployment.Run a post-deploy rebind step and verify the effective target IDs.
State and data behaviorDetermines whether deployment moves metadata only or also affects runtime state and data.Add explicit data seeding, migration, refresh, or job execution steps.

Code-First Baseline with fabric-cicd

For standard code-first releases, use the source-controlled workspace folder as the deployment input and explicitly limit the item types in scope. The target environment name can drive parameter replacement and variable-library value-set activation.

Deploy Fabric item definitions
import os

from azure.identity import DefaultAzureCredential
from fabric_cicd import FabricWorkspace, publish_all_items

target_workspace = FabricWorkspace(
    workspace_id=os.environ["FABRIC_WORKSPACE_ID"],
    environment=os.environ["DEPLOY_ENV"],
    repository_directory="workspace",
    item_type_in_scope=[
        "Lakehouse",
        "VariableLibrary",
        "Notebook",
        "DataPipeline",
        "SemanticModel",
        "Report",
    ],
    token_credential=DefaultAzureCredential(),
)

publish_all_items(target_workspace)
Deletion and orphan control require an explicit policy

fabric-cicd can remove target items that are no longer present in the repository. Do not enable orphan cleanup by default. Define protected item patterns, require approval, preview the impact, and confirm that runtime data or dependent consumers won't be unintentionally removed.

Post-deploy is part of the release

Deployment may create item definitions without populating data or completing every relationship. Plan explicit steps for value-set activation, shortcut creation, data seeding, dependency rebinding, semantic-model refresh, notebook or pipeline execution, and end-to-end smoke tests.

Items

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 or deployment experience. Some artifacts are naturally diff-friendly, while others have limited Git, API, service-principal, variable-library, or auto-binding support. Review the current supported-item matrix before choosing the release mechanism for an item type.

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 TypeHow It Behaves in GitDeployment 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.

Practices

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.
๐Ÿšฆ Release Discipline

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

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.