The Deployment Synchronization process can be automated with the use of a webhook. The GIT repository that is configured with a cartridge, should have the correct folder structure to enable artifacts to be added, so that they can synchronize with the cartridge and also it will add the artifacts to the correct location of the server to be deployed. For example, PHP cartridge users have to create a folder named www
inside the GIT repository to be able to upload PHP artifacts.
Setting a webhook at GitHub
A webhook needs to be set at the GitHub to inform Stratos Manager with regard to the new/updated applications that have been deployed. The following are the steps required to set a webhook at the GitHub:
- Subscribe to a cartridge with a GitHub repository URL.
- Go to the the GitHub website.
https://github.com/lakwarus/wordpress.git - Select repository.
- Click Goto Settings.
- Click Webhooks & Services.
The list of available service hooks will appear. - Add the payload URL in the Payload URL text-box.
For example:
https://admin:admin@<Stratos-Manager-HostName>:<Stratos-Manager-HttpsPort>/stratos/admin/reponotification
- Choose
application/vnd.github.v3+json
, as the payload version. - Disable SSL verification.
- Click Update webhook .