allez deploy¶
Deploy a solution to an environment. It runs one fab deploy per dag node, in dag order, with each node's hooks before and after it. A solution with no dag: refuses to deploy.
Usage¶
Arguments¶
| Argument | Description |
|---|---|
PATH |
Solution root (fabric/) or a single workspace sub-folder. Default: . |
Options¶
| Option | Description |
|---|---|
--env, -e <str> |
The environment to deploy: one of environments: in allez.yml. Selects the <env> keys in config.yml and parameter.yml. Required. |
--plan |
Preview without deploying anything. |
--skip-hooks |
Don't run any pre_deploy_hooks / post_deploy_hooks step. |
--branch-workspace |
Deploy into the branch workspace instead of the config.yml workspace for --env. With --commit-to-git this is the binding deploy that fills a new branch workspace. Refused on a protected branch (protected-branches). |
--branch, -b <str> |
Branch whose workspace --branch-workspace targets. Default: current. |
--commit-to-git |
After each workspace's last publish, connect it to the branch if it is not yet connected, then commit to git. If branch-workspace.git.base-env is set, also relate it to that environment's workspace; the relation changes only what the Fabric UI shows. Requires --branch-workspace and the root branch-workspace.git block. |
--since <git ref> |
A commit, tag or branch the target environment holds. Each node then lists the items that differ between it and the working tree: new, changed, changed in ids only, removed. Works with or without --plan (reading the plan). |
Examples¶
allez deploy fabric/reporting --env dev --plan # resolved config + the exact fab command, nothing executed
allez deploy fabric --env test --plan --since deployed/test # plus what the test deploy will create, change and delete
allez deploy fabric/reporting --env dev # one sub-folder — the dag filtered to its nodes, order kept
allez deploy fabric --env dev # the whole solution, in dag order
allez deploy fabric --env prod --skip-hooks # publish without the hook steps
# The binding deploy — the provision pipeline runs this, not you
allez deploy fabric --env feature --branch-workspace --commit-to-git
What a run does¶
Files on disk that no dag node names are listed once and ignored (the dag). Then, for each dag node in order:
- Validate the node's
allez.ymlfor--envand find the target workspace by name. With--since, list the node's item changes. - Run the node's
pre_deploy_hooks. - Resolve the
$allez.*tokens inparameter.yml, all or nothing ($allez.*variables). fab deploythe node's config. A failure stops the whole run, because later nodes may reference what this one was meant to publish.- Put
parameter.ymlback as it was; the repo keeps the tokens. - Run the node's
post_deploy_hooks. - With
--commit-to-git, after the workspace's last node: connect it to the branch through the git connection thatbranch-workspace.git.connection-namenames, update it from git if the branch has moved, commit ([skip ci]), and relate it tobranch-workspace.git.base-env's workspace if that is set (git).
What --plan prints for each step is on reading the plan.
Behaviour¶
- Workspaces and items are found by name. A missing or mistyped
core.workspace.<env>fails the deploy and names the workspace. Renaming an item publishes a new one; withunpublishon, the old one is deleted with any data it held. Treat a rename of a lakehouse, warehouse or SQL database as a data change: move the data first. - Definitions, not data. Tables, files and rows are not published, and a warehouse or SQL database arrives empty without a
publish_sqlprojstep (what a deploy does not carry). - Git steps never fail the run. The publish has already landed, so a refused connect or commit prints
! <workspace>: git integration failed, continuingwith the reason (troubleshooting). A missingbranch-workspace.gitblock is caught before any publish. - The commit is selective. An item the branch holds but the workspace lacks, such as one a publish filter excluded, stays in the branch.
- The binding deploy adds a commit to your branch.
git pullbefore you push again.