Starting with version 1.8.0, Apollo has added webhook support, which will be triggered to send you a message when your configuration is released.

How to enable webhook

The configuration items are stored in the table named ApolloPortalDB.ServerConfig. You may also config them in Admin Tools - System Configuration page. The configuration changes will take effect within one minute.

  1. webhook.supported.envs

The environment lists to enable webhook support. Multiple environments should be separated by commas, e.g.,

  1. DEV, FAT, UAT, PRO
  1. config.release.webhook.service.url

Config the url that receives HTTP post request sent by webhook for notifying. Multiple urls should be separated by commas, e.g.,

  1. http://www.xxx.com/webhook1,http://www.xxx.com/webhook2

How to use

  1. URL parameters
parameter name parameter annotation
env env of the configuration to be released
  1. Request body sample
  1. {
  2. "appId": "", // appId
  3. "clusterName": "", // cluster
  4. "namespaceName": "", // namespace
  5. "operator": "", // modifier
  6. "releaseId": 2, // release id
  7. "releaseTitle": "", // release title
  8. "releaseComment": "", // release Comment
  9. "releaseTime": "", // release time eg2020-01-01T00:00:00.000+0800
  10. "configuration": [ { // all configurations to be released; also applys to gray release
  11. "firstEntity": "", // key of configuration
  12. "secondEntity": "" // value of configuration
  13. } ],
  14. "isReleaseAbandoned": false,
  15. "previousReleaseId": 1, // releaseId of latest formal release
  16. "operation": // 0-normal release 1-rollabck 2-gray release 4-full release
  17. "operationContext": { // property setting for operation
  18. "isEmergencyPublish": true/false, // emergercy release or not
  19. "rules": [ { // rules for gray release
  20. "clientAppId": "", // appId
  21. "clientIpList": [ "10.0.0.2", "10.0.0.3" ] // IP lists
  22. } ],
  23. "branchReleaseKeys": [ "", "" ] // key of Gray Release
  24. }
  25. }