Buildbot for Nix, tailored for Lix usecases
Find a file
raito 0ffae5766b feat: add buildbot-profiler
This enable the possibility to run buildbot-profiler on a production
system.

This exposes the UI but does not compile properly the JavaScript assets
yet.

Signed-off-by: Raito Bezarius <raito@lix.systems>
2024-10-22 17:13:19 +02:00
.github Bump cachix/install-nix-action from 24 to 25 2024-01-15 01:50:37 +00:00
buildbot_nix feat: add buildbot-profiler 2024-10-22 17:13:19 +02:00
examples remove cachix 2024-03-11 06:26:39 +01:00
nix feat: add buildbot-profiler 2024-10-22 17:13:19 +02:00
.envrc devshell: enable typing for buildbot 2024-10-12 12:25:47 +02:00
.gitignore also create webhooks automatically 2023-10-12 17:50:43 +02:00
.mergify.yml add mergify 2023-10-12 23:59:45 +02:00
default.nix fix(reporters): restore old behavior for Gerrit reporting 2024-10-13 18:46:22 +02:00
flake.lock flake.lock: Update 2024-02-29 01:34:25 +00:00
flake.nix devshell: enable typing for buildbot 2024-10-12 12:25:47 +02:00
pyproject.toml chore(pyproject): add authorship information 2024-10-04 12:45:51 -07:00
README.md Improve readme 2023-12-24 07:51:41 +00:00

Buildbot-nix

Buildbot-nix is a NixOS module designed to integrate Buildbot, a continuous integration (CI) framework, into the Nix ecosystem. This module is under active development, and while it's generally stable and widely used, please be aware that some APIs may change over time.

Getting Started with Buildbot Setup

To set up Buildbot using Buildbot-nix, you can start by exploring the provided examples:

Additionally, you can find real-world examples at the end of this document.

Buildbot masters and workers can be deployed either on the same machine or on separate machines. To support multiple architectures, configure them as nix remote builders. For a practical NixOS example, see this remote builder configuration.

Using Buildbot in Your Project

Buildbot-nix automatically triggers builds for your project under these conditions:

  • When a pull request is opened.
  • When a commit is pushed to the default git branch.

It does this by evaluating the .#checks attribute of your project's flake in parallel. Each attribute found results in a separate build step. You can test these builds locally using nix flake check -L or nix-fast-build.

If you need to build other parts of your flake, such as packages or NixOS machines, you should re-export these into the .#checks output. Here are two examples to guide you:

Integration with GitHub

Buildbot-nix primarily supports GitHub, with plans to extend support to other platforms like Gitea.

To integrate with GitHub:

  1. GitHub App: Set up a GitHub app for Buildbot to enable GitHub user authentication on the Buildbot dashboard.
  2. OAuth Credentials: After installing the app, generate OAuth credentials and configure them in the buildbot-nix NixOS module.
  3. GitHub Token: Obtain a GitHub token with admin:repo_hook and repo permissions. For GitHub organizations, it's advisable to create a separate GitHub user for managing repository webhooks.

Real-World Deployments

See Buildbot-nix in action in these deployments: