Gitea Integration

Currently Buildkite supports several self-hosted Git servers GitHub Enterprise, Bitkbucket Server (formerly stash), and GitLab (CE & EE).

I have a webhook listener that can translate between Gitea & Buildkite: https://github.com/techknowlogick/gitea-buildkite-connector but first class integration between these two systems would be nice to have.

Gitea has a commit status API so CI systems can report build status per commit (PRs also leverage this API), and can act as an OAuth2 provider.

Some of the larger hosted versions of Gitea:

  • gitea.com (official flagship instance)
  • codeberg.org (a non-profit code hosting platform which uses Gitea)
  • git.teknik.io (part of a larger collaboration site which has thousands of users)

I am one of the lead developers of Gitea, and would be happy to help wherever I can.

Two things to note if this gets implemented:

  1. webhooks security is being increased right now and has two ways of verifying webhook content. The previous way was a plaintext token was passed as a field in webhook json (this is in process of being deprecated), and the new way (which should be used) is a header that checksums the content and hmac’s it with a shared secret.
  2. OAuth2 provider uses refresh tokens to renew access tokens.

Edit: Here is some documentation of setting up Gitea as an OAuth2 provider: https://docs.gitea.io/en-us/oauth2-provider/ and here are API & Swagger docs: https://docs.gitea.io/en-us/api-usage/ https://gitea.com/api/swagger

Hey @techknowlogick! Thanks for publishing the webhooks listener, and all the details we’d need to put together official integration.

We’ll look into this when we’re next improving our integrations. All the context/details here are perfect. Let us know if you make any big changes to the way it should get built.

1 Like