Webhooks in Kraken CI for GitHub, GitLab and Gitea

Intro to Webhooks

Kraken CI allows triggering a flow of a branch in a project using a
webhook in a Git hosting service. A push to a regular branch e.g. main
branch or to a branch associated with a pull or a merge request will cause
a Git hosting service to call a webhook exposed by Kraken CI. To make
it happen a webhook URL and a secret have to be stored in a project
settings in Git hosting service.

  • GitHub
  • GitLab
  • Gitea

Enable Webhooks in a Project

In Kraken CI go to your project page and switch to `WebHooks`
tab. There are available webhooks for several Git hosting services.
Enable the one that you are using for hosting your Git repository.
Enabled webhooks show an actuall webhook URL and a secret. These
information should be copied and set in you webhooks setting page in
your Git hosting service.

Set Webhook URL in Git Hosting Service

The following sections show how to set webhook URL to Kraken CI, a
secret that is used to authenticate and they show which event types
should be selected that will trigger a new flow in you Kraken CI
project.

GitHub

  • Pull Requests — they will trigger DEV flows in you Kraken CI
    project, in a branch indicated in the event
  • Pushes — they will trigger CI flows in you Kraken CI project,
    in a branch indicated in the event

GitLab

  • Push events — they will trigger CI flows in you Kraken CI
    project, in a branch indicated in the event
  • Merge Request events — they will trigger DEV flows in you Kraken CI project,
    in a branch indicated in the event

Gitea

  • Push — they will trigger CI flows in you Kraken CI project,
    in a branch indicated in the event
  • Pull Request and Pull Request Synchronized — they will trigger
    DEV flows in you Kraken CI project, in a branch indicated in the event

Trigger a Flow

Now, in your a folder with source code repository you may invoke git push command:

$ git push
$ git checkout -b my-branch
$ git push — set-upstream origin my-branch

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store