mirror of
https://github.com/microsoft/fabric-cicd.git
synced 2026-11-04 12:02:01 +00:00
This pull request adds support for publishing and managing "Org App" and "Org App Audience" item types in the deployment pipeline. It introduces new publisher classes, updates constants and mappings, enhances documentation, and adds comprehensive tests to ensure correct handling of these new item types, including their relationships and deployment order. **Support for new item types: Org App and Org App Audience** - Added `OrgAppPublisher` and `OrgAppAudiencePublisher` classes to handle publishing logic for the new item types (`src/fabric_cicd/_items/_orgapp.py`, `src/fabric_cicd/_items/_orgappaudience.py`) [[1]](diffhunk://#diff-f530c5a6a9918ed3f60e147c9dc1622bbee4054c217183e3cd58bdbfb0cb2401R1-R20) [[2]](diffhunk://#diff-a637318ff073320392d7046a9539f7b33dbee4955718b94bd0081e6888794e0dR1-R13). - Updated the publisher factory and item type mappings to recognize and instantiate these publishers (`src/fabric_cicd/_items/_base_publisher.py`, `src/fabric_cicd/constants.py`) [[1]](diffhunk://#diff-a077ffe516cef014bef47cce16065137725effecb517d141167e72d082592c3fR165-R166) [[2]](diffhunk://#diff-a077ffe516cef014bef47cce16065137725effecb517d141167e72d082592c3fR208-R209) [[3]](diffhunk://#diff-91c2d32be351f155f090c4bd57ebe3c10e646edbc1b663e2a72b697f956a949cR71-R72) [[4]](diffhunk://#diff-91c2d32be351f155f090c4bd57ebe3c10e646edbc1b663e2a72b697f956a949cR118-R119). - Added exclusion rules for Org App children to ensure correct payload structure (`src/fabric_cicd/constants.py`). --------- Co-authored-by: Alon Yeshurun <alonyeshurun+microsoft@microsoft.com> Co-authored-by: shirasassoon <66449905+shirasassoon@users.noreply.github.com>
49 lines
1.6 KiB
Python
49 lines
1.6 KiB
Python
# Copyright (c) Microsoft Corporation.
|
|
# Licensed under the MIT License.
|
|
|
|
# The following is intended for developers of fabric-cicd to debug locally against the github repo
|
|
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
from azure.identity import (
|
|
AzureCliCredential,
|
|
AzurePowerShellCredential,
|
|
ClientSecretCredential,
|
|
)
|
|
|
|
root_directory = Path(__file__).resolve().parent.parent
|
|
sys.path.insert(0, str(root_directory / "src"))
|
|
|
|
from fabric_cicd import append_feature_flag, change_log_level, deploy_with_config
|
|
|
|
# Uncomment to enable debug
|
|
change_log_level()
|
|
|
|
# In this example, the config file sits within the root/sample/workspace directory
|
|
config_file = str(root_directory / "sample" / "workspace" / "config.yml")
|
|
|
|
# Azure CLI auth - comment out to use a different auth method
|
|
token_credential = AzureCliCredential()
|
|
|
|
# Uncomment to use PowerShell auth
|
|
# token_credential = AzurePowerShellCredential()
|
|
|
|
# Uncomment to use SPN auth
|
|
# client_id = "your-client-id"
|
|
# client_secret = "your-client-secret"
|
|
# tenant_id = "your-tenant-id"
|
|
# token_credential = ClientSecretCredential(client_id=client_id, client_secret=client_secret, tenant_id=tenant_id)
|
|
|
|
# config_override_dict = {"core": {"item_types_in_scope": ["Notebook"]}, "publish": {"skip": {"dev": False}}}
|
|
|
|
deploy_with_config(
|
|
config_file_path=config_file,
|
|
# Comment out if environment is not needed
|
|
environment="dev",
|
|
# Explicit token credential required for auth (choose one of the options above)
|
|
token_credential=token_credential,
|
|
# Uncomment to override specific config values (pass in a dictionary of override values)
|
|
# config_override=config_override_dict
|
|
)
|