Getting Started¶
Installation¶
To install fabric-cicd, run:
Authentication¶
⚠️ DEPRECATION NOTICE: The
DefaultAzureCredentialfallback is deprecated and will be removed in a future release. Please provide an explicittoken_credentialparameter.
- 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, authentication is handled automatically through the user session context and therefore an explicit credential is not required in this scenario.
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,
)
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
