transactions.git

Provides git related transactions.

Functions

simple_automation.transactions.git.checkout(context: simple_automation.context.Context, url: str, dst: str, update: bool = True, depth=None)

Checkout (and optionally update) the given git repository to dst.

Parameters
  • context (Context) – The context providing the execution context and templating dictionary.

  • url (str) – The url of the git repository to checkout. Will be templated.

  • dst (str) – The remote destination path for the repository. Will be templated.

  • update (bool, optional) – Also tries to update the repository if it is already cloned. Defaults to true.

  • depth (str, optional) – Restrict repository cloning depth. Beware that updates might not work correctly because of forced updates.

Returns

The completed transaction

Return type

CompletedTransaction

simple_automation.transactions.git.clone(context: simple_automation.context.Context, url: str, dst: str, depth=None)

Clone a git repository, without updating it, if it is already cloned. Same as calling checkout() with update=False.

Parameters
  • context (Context) – The context providing the execution context and templating dictionary.

  • url (str) – The url of the git repository to checkout. Will be templated.

  • dst (str) – The remote destination path for the repository. Will be templated.

  • depth (str, optional) – Restrict repository cloning depth. Beware that updates might not work correctly because of forced updates.

Returns

The completed transaction

Return type

CompletedTransaction