You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -40,23 +38,23 @@ this example the password is ‘secret’):
40
38
41
39
Optional environment variables are:
42
40
43
-
*`RACK_ENV`: Can be test, development, or production.
44
-
*`DATABASE_URL`: The URL to the PostgreSQL database.
41
+
-`RACK_ENV`: Can be test, development, or production.
42
+
-`DATABASE_URL`: The URL to the PostgreSQL database.
45
43
46
44
## Webhook
47
45
48
46
The webhook sends messages to other services when events in trunk happen.
49
47
50
48
These events trigger the webhook and send a message.
51
49
52
-
* Successful create of a pod: `{'type':'pod','action':'create','timestamp':'<date>','data_url':'<URL>'}`
53
-
* Successful create of a version: `{'type':'version','action':'create','timestamp':'<date>','data_url':'<URL>'}`
54
-
* Successful update of a spec: `{'type':'spec','action':'update','timestamp':'<date>','data_url':'<URL>'}`
50
+
- Successful create of a pod: `{'type':'pod','action':'create','timestamp':'<date>','data_url':'<URL>'}`
51
+
- Successful create of a version: `{'type':'version','action':'create','timestamp':'<date>','data_url':'<URL>'}`
52
+
- Successful update of a spec: `{'type':'spec','action':'update','timestamp':'<date>','data_url':'<URL>'}`
55
53
56
54
Environment variables are:
57
55
58
-
*`OUTGOING_HOOK_PATH`: The garbled path used at the end of `<schema>://<domain>/hooks/trunk/<OUTGOING_HOOK_PATH>`.
59
-
*`WEBHOOKS_ENABLED`: If set to `true`, the webhook is enabled.
56
+
-`OUTGOING_HOOK_PATH`: The garbled path used at the end of `<schema>://<domain>/hooks/trunk/<OUTGOING_HOOK_PATH>`.
57
+
-`WEBHOOKS_ENABLED`: If set to `true`, the webhook is enabled.
60
58
61
59
### Usage in Trunk
62
60
@@ -93,3 +91,7 @@ Note: The webhooks are currently only available to CP internal services. We are
93
91
3. Install a POST route in your service that corresponds to the URL. Note: You MUST NOT use the value in `OUTGOING_HOOK_PATH` inside your public code. Instead, use an ENV variable as well, and set it to correspond to `OUTGOING_HOOK_PATH`.
94
92
95
93
You'll then receive POSTs to the URL with content `message=<JSON data>`.
0 commit comments