This example sets up a Github integration for your Cloudomation account. With a Github integration, you can write and edit flow scripts offline in your favourite editor. Simply push your flow scripts (and other resources such as settings) to your Github repository and they will be automatically copied over to your Cloudomation account.
The example consists of three flow scripts. The first two flow scripts set up the Github integration for your Cloudomation account. You only need to run them once. The third flow script synchronises flow scripts and other content from your Github repository to Cloudomation continuously.
The example here is set up for Github, but the principle is the same for any git repository.
Find all three flow scripts in the public flow script library:
To run the full process, make sure that you have all three flow scripts in your Cloudomation account, and that the flow scripts are named the same as they are in Github (without the .py extension). Start with Flow 1 (Configure Github and Cloudomation) and see what happens. Enjoy!
Flow 1: Set up webhooks
Flow 2: Set up Github repository
The second flow script is called „request_github_info.py“ in the public flow script library. It asks you for your Github information. If you do not yet have a Github repository that you want to use together with Cloudomation, this flow script will guide you through the process of setting up a repository. Once this flow script has received all necessary Github information from you, it will provide this information back to Flow 1, which will automatically configure a webhook for your Github repository.
Flow 3: Synchronise resources
The third flow script is called „sync_from_github.py“ in the public flow script library. Every time there is a push to your Github repository, the Github webhook will trigger the Cloudomation webhook which will start this flow script. This flow script copies all resources from your Github repository to Cloudomation and creates flow scripts and settings from .py and .yaml files in your Github repository.
Note: that files with endings other than .yaml and .py will be ignored.