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
Copy file name to clipboardExpand all lines: _docs/configure-ci-cd-pipeline/triggers/git-triggers.md
+34Lines changed: 34 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -232,6 +232,40 @@ max-width="60%"
232
232
**Report notification on pipeline execution* - Decide if[Slack notifications]({{site.baseurl}}/docs/integrations/notifications/slack-integration/) will be sent (as well as status updates back to your Git provider)
233
233
**Runtime Environment* - choose to use pipeline[settings]({{site.baseurl}}/docs/configure-ci-cd-pipeline/pipelines/#pipeline-settings) or override them
234
234
235
+
##Manually Adding the Trigger to GitHub
236
+
237
+
When creating a Git Trigger in codefresh, sometimes the Git Integration does not have the permissions to create a webhook on the designated repository. When this happens, you get the following error:`Failed to add Trigger`.
238
+
239
+
This error means that Codefresh could not create the webhook and verify that it works. With that, Codefresh will mark the Trigger as Unverified. Two additional fields (Endpoint and Secret) will appear under the "Verify Trigger" button when you get this error.
240
+
241
+
-**Endpoint**: This will be the Webhook URL for the created Trigger
242
+
-**Secret**: Token to add to Github for verification.
243
+
244
+
###Adding Webhook to Github
245
+
246
+
1. When you receive the`Failed to add Trigger`.
247
+
2. Log into GitHub
248
+
- Make this user can access the repository settings and create Webhooks
249
+
3. Go to the repository mentioned in the "REPOSITORY" section from Unverified Trigger.
250
+
4. Go to Settings > Webhooks and click the "Add webhook" button.
251
+
5. Fill in the form
252
+
-**Payload URL**: The URL from the Endpoint field from the Trigger
253
+
-**Content type**: application/json
254
+
-**Secret**: The token in the Secret field from the Trigger
255
+
-**SSL verification**: Enable SSL verification
256
+
-**Events**:
257
+
1. Select let me select individual events
258
+
2. Match the items selected in the Trigger By field from the Trigger
259
+
-**Active**: Make sure this is selected
260
+
6. Click "Add webhook" when done.
261
+
7. Click "Done" in the Add Trigger form.
262
+
8. Test your webhook by making an event in the repository that will cause the Trigger to start the build.
263
+
264
+
>**Note**:
265
+
>
266
+
>- You will be responsible for syncing the Trigger By to the Events sent to us for the webhook. You can select "Send me everything" if you do not want to manually match the Trigger By in the Trigger with the Webhook Events in GitHub.
267
+
>- The Trigger will remain "Unverified" until the integration has the correct permissions to the repository.
268
+
235
269
##Accessing directly the webhook content of the trigger
236
270
237
271
If your Git trigger is coming from Github, you can also access the whole payload of the webhook that was responsible for the trigger.