File tree Expand file tree Collapse file tree 4 files changed +90
-0
lines changed Expand file tree Collapse file tree 4 files changed +90
-0
lines changed Original file line number Diff line number Diff line change 1
1
result
2
2
result- *
3
3
4
+ .buildbot-dev
5
+
4
6
# Byte-compiled / optimized / DLL files
5
7
__pycache__ /
6
8
* .py [cod ]
Original file line number Diff line number Diff line change
1
+ {
2
+ writeShellScriptBin ,
3
+ python ,
4
+ buildbot ,
5
+ buildbot-worker ,
6
+ buildbot-nix ,
7
+ buildbot-gitea ,
8
+ buildbot-effects ,
9
+ buildbot-plugins ,
10
+ } :
11
+ let
12
+ pythonEnv = python . withPackages ( ps : [
13
+ ps . twisted
14
+ ( ps . toPythonModule buildbot )
15
+ ( ps . toPythonModule buildbot-worker )
16
+ buildbot-nix
17
+ buildbot-gitea
18
+ buildbot-effects
19
+ buildbot-plugins . www
20
+ ] ) ;
21
+ in
22
+ writeShellScriptBin "buildbot-dev" ''
23
+ set -xeuo pipefail
24
+ git_root=$(git rev-parse --show-toplevel)
25
+ mkdir -p "$git_root/.buildbot-dev"
26
+ cd "$git_root/.buildbot-dev"
27
+ "${ pythonEnv } /bin/buildbot" create-master .
28
+ #if [ ! -f master.cfg ]; then
29
+ install -m600 ${ ./master.cfg.py } master.cfg
30
+ #fi
31
+ echo > $git_root/.buildbot-dev/twistd.log
32
+ tail -f $git_root/.buildbot-dev/twistd.log &
33
+ tail_pid=$!
34
+ trap 'kill $tail_pid' EXIT
35
+ "${ pythonEnv } /bin/buildbot" start --nodaemon .
36
+ ''
Original file line number Diff line number Diff line change 3
3
{
4
4
lib ,
5
5
pkgs ,
6
+ self' ,
6
7
...
7
8
} :
8
9
{
9
10
packages =
10
11
{
11
12
# useful for checking what buildbot version is used.
12
13
buildbot = pkgs . callPackage ./buildbot.nix { } ;
14
+ buildbot-dev = pkgs . python3 . pkgs . callPackage ./buildbot-dev.nix {
15
+ inherit ( self' . packages )
16
+ buildbot-gitea
17
+ buildbot-effects
18
+ buildbot-nix
19
+ buildbot
20
+ ;
21
+ inherit ( pkgs ) buildbot-worker buildbot-plugins ;
22
+ } ;
13
23
buildbot-nix = pkgs . python3 . pkgs . callPackage ./buildbot-nix.nix { } ;
14
24
buildbot-gitea = pkgs . python3 . pkgs . callPackage ./buildbot-gitea.nix {
15
25
buildbot = pkgs . buildbot ;
Original file line number Diff line number Diff line change
1
+ from pathlib import Path
2
+ from buildbot_nix import (
3
+ NixConfigurator ,
4
+ BuildbotNixConfig ,
5
+ )
6
+ from buildbot .process .factory import BuildFactory
7
+
8
+ factory = BuildFactory ()
9
+
10
+ STATE_DIR = Path ("." )
11
+ PORT = 8012
12
+
13
+ buildbot_nix_config = BuildbotNixConfig (
14
+ db_url = "sqlite:///state.sqlite" ,
15
+ pull_based = dict (
16
+ repositories = {
17
+ "buildbot-nix" : dict (
18
+ name = "buildbot-nix" ,
19
+ url = "https://github.com/nix-community/buildbot-nix" ,
20
+ default_branch = "main" ,
21
+ )
22
+ },
23
+ poll_spread = None ,
24
+ ),
25
+ build_systems = ["x86_64-linux" ],
26
+ eval_max_memory_size = 4096 ,
27
+ eval_worker_count = 4 ,
28
+ local_workers = 4 ,
29
+ domain = "localhost" ,
30
+ webhook_base_url = f"http://localhost:{ PORT } " ,
31
+ url = f"http://localhost:{ PORT } " ,
32
+ )
33
+
34
+ c = BuildmasterConfig = dict (
35
+ title = "Hello World CI" ,
36
+ titleURL = "https://buildbot.github.io/hello-world/" ,
37
+ configurators = [
38
+ NixConfigurator (buildbot_nix_config ),
39
+ ],
40
+ protocols = {"pb" : {"port" : "tcp:9989:interface=\\ :\\ :1" }},
41
+ www = dict (port = PORT , plugins = dict ()),
42
+ )
You can’t perform that action at this time.
0 commit comments