Getting Started¶
Installation¶
To install fabric-cicd, run:
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
GIT Flow¶
The flow pictured below is the hero scenario for this library and is the recommendation if you're just starting out.
Deployedbranches are not connected to workspaces via GIT SyncFeaturebranches are connected to workspaces via GIT SyncDeployedworkspaces are only updated through script-based deployments, such as through the fabric-cicd libraryFeaturebranches are created from the default branch, merged back into the defaultDeployedbranch, and cherry picked into the upperDeployedbranches- Each deployment is a full deployment and does not consider commit diffs
