Using the git integration it is possible to synchronize the content of a git repository with Cloudomation.
Generally it is recommended to store all your Cloudomation resources in git. There are plenty of benefits:
- Use of your favourite offline editor
- Version history of all changes to your automation logic
- Collaboration between users easily possible
- An additional backup of your automation logic
- Branching, merging, rollback, ...
The git integration currently operates read-only. Meaning, no changes are made to the repository by Cloudomation.
When a user manually modifies a resource which is synced to Cloudomation via the git integration, the changes will be overwritten with the next synchronization interval.
Flows, schedulers, settings, and files can be imported directly into the flow, scheduler, setting, and file resource. All other resource types can be imported using a Cloudomation export yaml.
Please see the table below for the different git_config fields and their meanings:
|Remote URL||The URL to the git repository (special characters must be %-encoded). Supports HTTPS and SSH protocols.|
|Enabled||If unset, Cloudomation will not sync anything|
|Priority||When using multiple git_configs the one with the lower priority will win when there are conflicts|
|Git ref||The git ref to sync. Can be a branch name, a tag, or a commit SHA|
|Username||When using a HTTPS remote URL this username will be used for basic auth|
|Password||When using a HTTPS remote URL this password will be used for basic auth|
|SSH key||When using a SSH remote URL this key will be used to authenticate. Must be in PEM format.|
|SSH hostkey||When using a SSH remote URL this will be used to verify the identity of the remote|
|Path mapping||A mapping of record types to globs. All files in the repo matching a glob will be loaded to the specified record type.||See [Path mapping]|
remote URL is expected to be %-encoded (special characters)!
If password or username are provided inside the remote URL those must be encoded, too!
The path mapping spcifies which files from the repository are loaded to which resource types.
The example above will
- Load all
*.pyfiles in the
flowsfolder to the flow resource.note
The file extension
.pyis removed from the resource name
- Load all files in any folder below
templatesinto the file resource
script.shinto the file resource
- Import all
*.yamlfiles in the
Please refer to Import / Export and Upload for details on export YAML files.
The environment variable
GIT_SYNC_INTERVAL specifies the time in seconds between
automatic synchronizations. The default is 10 minutes (600 seconds). To synchronize
immediately either disable and re-enable a git_config - every update triggers a
synchronization - or send a
PATCH request to
Resources in the git repository are matched by name to resources on the Cloudomation platform. Changes that are made to resources on the platform will be overwritten automatically with the next synchronization as long as the name of the resource is the same as the name of the resource in the git repository. Renaming a resource will result in the next synchronisation creating a new file with the original name.
Metadata docstring block in flows
Cloudomation will parse the content of files which are loaded to the flows resource to detect additional attributes.
All additional attributes can be specified in the docstring. Two formats are recognized:
The content of this docstring is used for the "description" field of the flow
""" # Cloudomation metadata:
def handler(system: flow_api.System, this: flow_api.Execution):
return this.success('all done')
The parsing is done line-by-line. The first non-empty line which is not a docstring will stop the parsing.
A normal docstring will be used in the
description field of the flow.
A docstring which is started by the line
""" # Cloudomation metadata: will be parsed as a YAML
document and can specify all fields of the flow & related resources similar to the export