From 603752e1e3fe96bdaa9f8e5ffceae6a99a145139 Mon Sep 17 00:00:00 2001 From: makefu Date: Fri, 12 Feb 2016 22:15:18 +0100 Subject: s 2 buildbot: fix regex --- shared/2configs/shared-buildbot.nix | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'shared/2configs') diff --git a/shared/2configs/shared-buildbot.nix b/shared/2configs/shared-buildbot.nix index af877f5d..604cbc5b 100644 --- a/shared/2configs/shared-buildbot.nix +++ b/shared/2configs/shared-buildbot.nix @@ -26,13 +26,12 @@ builderNames=["full-tests"])) ''; fast-tests-scheduler = '' - # test the master real quick + # test everything BUT the master real quick sched.append(schedulers.SingleBranchScheduler( ## all branches - change_filter=util.ChangeFilter(branch_re=".*"), - # change_filter=util.ChangeFilter(branch="master"), - treeStableTimer=10, #only test the latest push - name="fast-master-test", + change_filter=util.ChangeFilter(branch_re="(?!^master$)"), + # treeStableTimer=10, + name="fast-test-all-branches", builderNames=["fast-tests"])) ''; test-cac-infest-master = '' -- cgit v1.2.3 From e62a0475cd45e30f10d4bce8837b8a776eeb4754 Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 15 Feb 2016 14:00:21 +0100 Subject: s 2 cgit-mirror: add correct pubkey, add user to krebs.users --- shared/2configs/cgit-mirror.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'shared/2configs') diff --git a/shared/2configs/cgit-mirror.nix b/shared/2configs/cgit-mirror.nix index 4ff1902f..0794ee41 100644 --- a/shared/2configs/cgit-mirror.nix +++ b/shared/2configs/cgit-mirror.nix @@ -3,7 +3,7 @@ with lib; let rules = with git; singleton { - user = [ git-sync ]; + user = [ wolf-repo-sync ]; repo = [ stockholm-mirror ]; perm = push ''refs/*'' [ non-fast-forward create delete merge ]; }; @@ -22,14 +22,15 @@ let }; }; - git-sync = { - name = "git-sync"; + wolf-repo-sync = { + name = "wolf-repo-sync"; mail = "spam@krebsco.de"; # TODO put git-sync pubkey somewhere more appropriate - pubkey = ''ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCzUuzyoAhMgJmsiaTVWNSXqcrZNTpKpv0nfFBOMcNXUWEbvfAq5eNpg5cX+P8eoYl6UQgfftbYi06flKK3yJdntxoZKLwJGgJt9NZr8yZTsiIfMG8XosvGNQtGPkBtpLusgmPpu7t2RQ9QrqumBvoUDGYEauKTslLwupp1QeyWKUGEhihn4CuqQKiPrz+9vbNd75XOfVZMggk3j4F7HScatmA+p1EQXWyq5Jj78jQN5ZIRnHjMQcIZ4DOz1U96atwSKMviI1xEZIODYfgoGjjiWYeEtKaLVPtSqtLRGI7l+RNouMfwHLdTWOJSlIdFncfPXC6R19hTll3UHeHLtqLP git-sync''; + pubkey = ''ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCwuAZB3wtAvBJFYh+gWdyGaZU4mtqM2dFXmh2rORlbXeh02msu1uv07ck1VKkQ4LgvCBcBsAOeVa1NTz99eLqutwgcqMCytvRNUCibcoEWwHObsK53KhDJj+zotwlFhnPPeK9+EpOP4ngh/tprJikttos5BwBwe2K+lfiid3fmVPZcTTYa77nCwijimMvWEx6CEjq1wiXMUc4+qcEn8Swbwomz/EEQdNE2hgoC3iMW9RqduTFdIJWnjVi0KaxenX9CvQRGbVK5SSu2gwzN59D/okQOCP6+p1gL5r3QRHSLSSRiEHctVQTkpKOifrtLZGSr5zArEmLd/cOVyssHQPCX repo-sync@wolf''; }; in { + krebs.users.wolf-repo-sync = wolf-repo-sync; krebs.git = { enable = true; root-title = "Shared Repos"; -- cgit v1.2.3 From ac31ea80288e2f9ae9eda10d28a912e23bc6647e Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 15 Feb 2016 14:02:44 +0100 Subject: s 2 buildbot: use the correct NIX_PATH" --- shared/2configs/shared-buildbot.nix | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'shared/2configs') diff --git a/shared/2configs/shared-buildbot.nix b/shared/2configs/shared-buildbot.nix index 604cbc5b..9327d2f9 100644 --- a/shared/2configs/shared-buildbot.nix +++ b/shared/2configs/shared-buildbot.nix @@ -23,13 +23,13 @@ force-scheduler = '' sched.append(schedulers.ForceScheduler( name="force", - builderNames=["full-tests"])) + builderNames=["full-tests","fast-tests"])) ''; fast-tests-scheduler = '' - # test everything BUT the master real quick + # test everything real quick sched.append(schedulers.SingleBranchScheduler( ## all branches - change_filter=util.ChangeFilter(branch_re="(?!^master$)"), + change_filter=util.ChangeFilter(branch_re=".*"), # treeStableTimer=10, name="fast-test-all-branches", builderNames=["fast-tests"])) @@ -132,7 +132,7 @@ }; irc = { enable = true; - nick = "shared-buildbot"; + nick = "wolfbot"; server = "cd.retiolum"; channels = [ "retiolum" ]; allowForce = true; @@ -146,6 +146,7 @@ password = "krebspass"; packages = with pkgs;[ git nix ]; # all nix commands will need a working nixpkgs installation - extraEnviron = { NIX_PATH="/var/src"; }; + extraEnviron = { + NIX_PATH="nixpkgs=/var/src/upstream-nixpkgs:nixos-config=./shared/1systems/wolf.nix"; }; }; } -- cgit v1.2.3 From 859144f1d0ca1fd2065f9dfa74cf14cd5af0cc1d Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 15 Feb 2016 14:03:47 +0100 Subject: s 2 repo-sync: init --- shared/2configs/repo-sync.nix | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 shared/2configs/repo-sync.nix (limited to 'shared/2configs') diff --git a/shared/2configs/repo-sync.nix b/shared/2configs/repo-sync.nix new file mode 100644 index 00000000..b23cb167 --- /dev/null +++ b/shared/2configs/repo-sync.nix @@ -0,0 +1,28 @@ +{ config, lib, pkgs, ... }: + +with lib; +{ + krebs.repo-sync = let + # TODO addMirrorURL function + mirror = "git@wolf:stockholm-mirror"; + in { + enable = true; + config = { + makefu = { + origin.url = http://cgit.gum/stockholm ; + mirror.url = mirror; + }; + tv = { + origin.url = http://cgit.cd/stockholm ; + mirror.url = mirror; + }; + lassulus = { + origin.url = http://cgit.cloudkrebs/stockholm ; + mirror.url = mirror; + }; + "@latest" = { + mirror.url = mirror; + }; + }; + }; +} -- cgit v1.2.3 From 9a4071b66ff45e99a30e9a314eb43c6efc7e921f Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 15 Feb 2016 14:25:30 +0100 Subject: s 2 shared-buildbot: add TODO --- shared/2configs/shared-buildbot.nix | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'shared/2configs') diff --git a/shared/2configs/shared-buildbot.nix b/shared/2configs/shared-buildbot.nix index 9327d2f9..19724ac0 100644 --- a/shared/2configs/shared-buildbot.nix +++ b/shared/2configs/shared-buildbot.nix @@ -1,18 +1,22 @@ { lib, config, pkgs, ... }: -# The buildbot config is seilf-contained and provides a way to test "shared" -# configuration (infrastructure to be used by every krebsminister). +# The buildbot config is self-contained and currently provides a way +# to test "shared" configuration (infrastructure to be used by every krebsminister). # You can add your own test, test steps as required. Deploy the config on a # shared host like wolf and everything should be fine. + +# TODO for all users schedule a build for fast tests { networking.firewall.allowedTCPPorts = [ 8010 9989 ]; - krebs.buildbot.master = { + krebs.buildbot.master = let + stockholm-mirror-url = http://cgit.wolf/stockholm-mirror ; + in { secrets = [ "retiolum-ci.rsa_key.priv" "cac.json" ]; slaves = { testslave = "krebspass"; }; change_source.stockholm = '' - stockholm_repo = 'http://cgit.wolf/stockholm-mirror' + stockholm_repo = '${stockholm-mirror-url}' cs.append(changes.GitPoller( stockholm_repo, workdir='stockholm-poller', branches=True, -- cgit v1.2.3 From a94a4c42065fb2fd489a03fd7b0db60ebabb8ebf Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 15 Feb 2016 17:43:30 +0100 Subject: s 1 wolf: use config.krebs.lib --- shared/2configs/shack-drivedroid.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'shared/2configs') diff --git a/shared/2configs/shack-drivedroid.nix b/shared/2configs/shack-drivedroid.nix index 08a6b069..2e9d2c00 100644 --- a/shared/2configs/shack-drivedroid.nix +++ b/shared/2configs/shack-drivedroid.nix @@ -1,7 +1,8 @@ { pkgs, lib, config, ... }: + let repodir = "/var/srv/drivedroid"; - srepodir = lib.shell.escape repodir; + srepodir = config.krebs.lib.shell.escape repodir; in { environment.systemPackages = [ pkgs.drivedroid-gen-repo ]; @@ -40,5 +41,4 @@ in }; }; }; - } -- cgit v1.2.3