AzureDevOpsGitDagBundle¶
DAG bundle that clones Azure DevOps Git repos with Entra ID auth.
- class airflow.providers.git_azure.bundles.git_azure.AzureDevOpsGitDagBundle(*, tracking_ref: str | None = None, git_conn_id: str | None = None, repo_url: str | None = None, **kwargs)¶
Basisklassen:
GitDagBundleTransparent Git DAG bundle that adds Entra ID workload-identity auth for Azure DevOps.
Behaves exactly like
GitDagBundle— GitHub URLs, PAT-based connections, and SSH-key connections work unchanged. Only when the repository URL is an Azure DevOps HTTPS URL and the connection carries no credential of its own does every clone/fetch inject a freshly minted Entra ID access token obtained through the pod’s workload identity (seeAzureDevOpsGitHook).In that case the connection referenced by
git_conn_idonly needs the repository URL as its host, e.g.:https://dev.azure.com/<org>/<project>/_git/<repo>
Accepts the same parameters as
GitDagBundle, with one difference:tracking_refmay also come from the connection. Atracking_refkey in the connection’s extra overrides the bundle-config value, so a single deployed bundle config can track a different branch/tag per Airflow instance by editing only the connection. The config kwarg is therefore optional — it is an error only if neither source provides a value.- initialize() None¶
Clone or fetch the bundle, converting clone/fetch failures to AirflowException.
- Veroorzaakt:
AirflowException – If the underlying clone/fetch fails (e.g. repo not found, auth rejected, or a git checkout error).
- view_url_template() str | None¶
Return the “view on web” URL template, adding Azure DevOps support.
- Returns:
A URL template with a
{version}placeholder, or None if the repo URL isn’t a recognized host.- Return type:
str | None