How to integrate gateway setup XML files with source or version control systems
Users can make use of the Gateway Hooks feature. Gateway Hooks provide a way for clients to fire custom programs or scripts when certain important gateway events occur. Users can create scripts to push changes to Git for example.
To use Gateway Hooks, users will need to specify the -hooks-dir parameter on gateway startup, which points to a directory that contains customized scripts for their environment. One feature of Gateway Hooks is Post Setup Apply (another feature is Validate Setup). This is fired after the gateway has finished applying a new setup. The script should be named post-setup-apply, which will be triggered every time that the setup is applied.
The gateway package includes sample scripts located at the ./resources/hooks/example directory. Users can use this as a starting point and customize the scripts to meet their requirements. The gateway passes the setup files and related information through environment variables to the script. The script can also pass back filename with versions and return code, and the gateway will process the output.
For more information, refer to the Gateway Hooks section in the Gateway Advanced Features documentation and the article Using Git with Geneos.