Getting Started¶
Installation¶
To install fabric-cicd, run:
Prefer a command-line experience over writing Python?
If you'd rather not write Python, the Microsoft Fabric CLI (fab) includes a deploy command that runs fabric-cicd under the hood. It deploys Fabric items to a workspace directly from the command line using a shared config.yml file. See Deploying with the Fabric CLI for details.
Authentication¶
⚠️ NOTICE: Due to security best practices, the Default Credential (
DefaultAzureCredentialfallback) and implicit Fabric Notebook authentication (without atoken_credentialparameter) methods are no longer supported.token_credentialis now a required parameter.
- You must provide your own credential object that aligns with the
TokenCredentialclass (from azure.identity). For more details, see the TokenCredential documentation. - When running in Fabric Notebook runtime, provide an explicit credential. See Authentication examples for details.
Recommended Authentication Methods:
- For local development:
AzureCliCredentialorAzurePowerShellCredential(user authentication) - For CI/CD pipelines:
AzureCliCredential/AzurePowerShellCredential(platform authentication),ClientSecretCredential(service principal), orManagedIdentityCredential(self-hosted agents)
Basic Example:
from azure.identity import AzureCliCredential
from fabric_cicd import FabricWorkspace
token_credential = AzureCliCredential()
workspace = FabricWorkspace(
workspace_id="your-workspace-id",
environment="your-target-environment",
repository_directory="your-repository-directory",
item_type_in_scope=["Notebook", "DataPipeline", "Environment"],
token_credential=token_credential, # or any other TokenCredential
)
See the Authentication Examples for specific implementation patterns.
Directory Structure¶
This library deploys from a directory containing files and directories committed via the Fabric Source Control UI. Ensure the repository_directory includes only these committed items, with the exception of the parameter.yml file.
/<your-directory>
/<item-name>.<item-type>
...
/<item-name>.<item-type>
...
/<workspace-subfolder>
/<item-name>.<item-type>
...
/<item-name>.<item-type>
...
/parameter.yml
Next steps¶
- Review the recommended Git flow and deployment philosophy for fabric-cicd deployments.
- Configure deployment behavior with Configuration Deployment.
- Learn how to manage environment-specific values with Parameterization.
- See Authentication Examples for local and pipeline authentication patterns.