Categorygithub.com/konstellation-io/kai-processes/gitlab-webhook-trigger
modulepackage
1.0.0
Repository: https://github.com/konstellation-io/kai-processes.git
Documentation: pkg.go.dev

# README

Gitlab webhook trigger

The gitlab webhook trigger is a predefined KAI process that creates a gitlab webhook passive listener. It will stay listening for user requested events, then trigger a KAI workflow on said event.
The trigger supports the following event types:

  • push
  • merge_request
  • comment
  • tag

How to setup

The trigger requires adding two configuration options to the process-scoped configuration. One being the events the webhook will listen to (webhook_events), the other the gitlab secret needed to interact with the gitlab repo (gitlab_secret).

! Gitlab repository needs to be configured also to expose events to the webhook please check webhook_guide for more information.

Configuration

KeyOptionalTypeValue
webhook_eventsnostrPossible options (comma separated): push, merge_request, comment, tag
gitlab_secretyesstrGitlab's webhook secret

Output (JSON)

KeyTypeValue
requestIDstrA string uuid
eventUrlstrThe url from the repo triggering the event
eventstrThe name of the event that has occurred

Example

{
 "requestID": "123",
 "eventUrl": "http:://example/webhook-github",
 "event": "Push Hook"
}