deploy_tools.compare#

Members

ComparisonError

Raised when comparing the deployment area to its snapshot fails.

compare_to_snapshot

Compare deployment area to deployment configuration snapshot.

exception deploy_tools.compare.ComparisonError[source]#

Raised when comparing the deployment area to its snapshot fails.

deploy_tools.compare.compare_to_snapshot(deployment_root: Path, use_ref: str | None = None, from_scratch: bool = False) None[source]#

Compare deployment area to deployment configuration snapshot.

This helps us to identify broken environment modules, or a failed deployment step. Note that this does not exclude the possibility of all types of issues.

The use_ref argument can be used to compare against a previous Deployment configuration. It is recommended to use a reference relative to HEAD, e.g. ‘HEAD~1’.

The from_scratch argument checks that the deployment area is in a suitable state for a clean deployment into an empty directory. No snapshot is expected.

Parameters:
  • deployment_root – The root folder of the Deployment Area.

  • use_ref – If specified, compare to the snapshot from the given deployment area git ref

  • from_scratch – If True, check that the deployment area is empty and ignore other requirements.