aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/private/buildbot/projects/denise/__init__.py35
-rw-r--r--modules/private/default.nix1
-rw-r--r--modules/private/websites/default.nix1
-rw-r--r--modules/private/websites/denise/aventuriers.nix26
-rw-r--r--nix/sources.json12
5 files changed, 74 insertions, 1 deletions
diff --git a/modules/private/buildbot/projects/denise/__init__.py b/modules/private/buildbot/projects/denise/__init__.py
index c07655b..bd460d1 100644
--- a/modules/private/buildbot/projects/denise/__init__.py
+++ b/modules/private/buildbot/projects/denise/__init__.py
@@ -17,6 +17,9 @@ class E():
17 OMS_RELEASE_PATH = "/var/lib/buildbot/outputs/denise/oms" 17 OMS_RELEASE_PATH = "/var/lib/buildbot/outputs/denise/oms"
18 OMS_GIT_URL = "gitolite@git.immae.eu:perso/Denise/oms" 18 OMS_GIT_URL = "gitolite@git.immae.eu:perso/Denise/oms"
19 19
20 AVENTURIERS_RELEASE_PATH = "/var/lib/buildbot/outputs/denise/aventuriers"
21 AVENTURIERS_GIT_URL = "https://git.immae.eu/perso/Denise/aventuriers.git"
22
20 # master.cfg 23 # master.cfg
21 SECRETS_FILE = os.getcwd() + "/secrets" 24 SECRETS_FILE = os.getcwd() + "/secrets"
22 LDAP_URL = "ldaps://ldap.immae.eu:636" 25 LDAP_URL = "ldaps://ldap.immae.eu:636"
@@ -51,11 +54,13 @@ def configure(c):
51 c['workers'].append(worker.LocalWorker("generic-worker-denise")) 54 c['workers'].append(worker.LocalWorker("generic-worker-denise"))
52 55
53 c['schedulers'].append(hook_scheduler("DeniseOMS", timer=1)) 56 c['schedulers'].append(hook_scheduler("DeniseOMS", timer=1))
57 c['schedulers'].append(hook_scheduler("DeniseAventuriers", timer=1))
54 c['schedulers'].append(force_scheduler("force_denise", [ 58 c['schedulers'].append(force_scheduler("force_denise", [
55 "DeniseOMS_build" 59 "DeniseOMS_build", "DeniseAventuriers_build"
56 ])) 60 ]))
57 61
58 c['builders'].append(denise_oms_factory()) 62 c['builders'].append(denise_oms_factory())
63 c['builders'].append(denise_aventuriers_factory())
59 64
60def denise_oms_factory(): 65def denise_oms_factory():
61 factory = util.BuildFactory() 66 factory = util.BuildFactory()
@@ -70,3 +75,31 @@ def denise_oms_factory():
70 factory.addStep(steps.MasterShellCommand(command="kill $(cat /run/denise_oms/gunicorn.pid)")) 75 factory.addStep(steps.MasterShellCommand(command="kill $(cat /run/denise_oms/gunicorn.pid)"))
71 76
72 return util.BuilderConfig(name="DeniseOMS_build", workernames=["generic-worker-denise"], factory=factory) 77 return util.BuilderConfig(name="DeniseOMS_build", workernames=["generic-worker-denise"], factory=factory)
78
79def denise_aventuriers_factory():
80 path_env = {
81 "PATH": os.environ["BUILDBOT_PATH_Aventuriers"] + ":${PATH}"
82 }
83
84 factory = util.BuildFactory()
85 factory.addStep(steps.Git(logEnviron=False, repourl=E.AVENTURIERS_GIT_URL,
86 submodules=True, mode="full", method="copy"))
87 factory.addStep(steps.ShellCommand(name="build files",
88 logEnviron=False, haltOnFailure=True, workdir="source",
89 env=path_env, command=["make", "tout", "encyclo"]))
90 factory.addStep(steps.MasterShellCommand(command="rm -rf {}".format(E.AVENTURIERS_RELEASE_PATH)))
91 factory.addStep(steps.DirectoryUpload(workersrc="../source/html",
92 masterdest=E.AVENTURIERS_RELEASE_PATH,
93 url="https://aventuriers.syanni.eu"))
94 factory.addStep(steps.FileUpload(name="upload mobi file", workersrc="aventuriers.mobi",
95 workdir="source", masterdest=E.AVENTURIERS_RELEASE_PATH + "/aventuriers.mobi",
96 url="https://aventuriers.syanni.eu/aventuriers.mobi", mode=0o644))
97 factory.addStep(steps.FileUpload(name="upload pdf file", workersrc="aventuriers.pdf",
98 workdir="source", masterdest=E.AVENTURIERS_RELEASE_PATH + "/aventuriers.pdf",
99 url="https://aventuriers.syanni.eu/aventuriers.pdf", mode=0o644))
100 factory.addStep(steps.FileUpload(name="upload encyclo pdf file", workersrc="encyclo.pdf",
101 workdir="source", masterdest=E.AVENTURIERS_RELEASE_PATH + "/encyclo.pdf",
102 url="https://aventuriers.syanni.eu/encyclo.pdf", mode=0o644))
103 factory.addStep(steps.MasterShellCommand(command="chmod -R a+rX {}".format(E.AVENTURIERS_RELEASE_PATH)))
104
105 return util.BuilderConfig(name="DeniseAventuriers_build", workernames=["generic-worker-denise"], factory=factory)
diff --git a/modules/private/default.nix b/modules/private/default.nix
index 2c8ae6c..9ea136e 100644
--- a/modules/private/default.nix
+++ b/modules/private/default.nix
@@ -32,6 +32,7 @@ set = {
32 deniseDenisejeromeProd = ./websites/denise/denisejerome.nix; 32 deniseDenisejeromeProd = ./websites/denise/denisejerome.nix;
33 deniseEvariste = ./websites/denise/evariste.nix; 33 deniseEvariste = ./websites/denise/evariste.nix;
34 deniseOMS = ./websites/denise/oms.nix; 34 deniseOMS = ./websites/denise/oms.nix;
35 deniseAventuriers = ./websites/denise/aventuriers.nix;
35 deniseProduction = ./websites/denise/production.nix; 36 deniseProduction = ./websites/denise/production.nix;
36 37
37 emiliaMoodle = ./websites/emilia/moodle.nix; 38 emiliaMoodle = ./websites/emilia/moodle.nix;
diff --git a/modules/private/websites/default.nix b/modules/private/websites/default.nix
index 94506c9..d9665ff 100644
--- a/modules/private/websites/default.nix
+++ b/modules/private/websites/default.nix
@@ -241,6 +241,7 @@ in
241 evariste.enable = true; 241 evariste.enable = true;
242 denisejerome.enable = true; 242 denisejerome.enable = true;
243 oms.enable = true; 243 oms.enable = true;
244 aventuriers.enable = true;
244 production.enable = true; 245 production.enable = true;
245 }; 246 };
246 247
diff --git a/modules/private/websites/denise/aventuriers.nix b/modules/private/websites/denise/aventuriers.nix
new file mode 100644
index 0000000..33df53e
--- /dev/null
+++ b/modules/private/websites/denise/aventuriers.nix
@@ -0,0 +1,26 @@
1{ lib, config, pkgs, ... }:
2let
3 cfg = config.myServices.websites.denise.aventuriers;
4 varDir = "/var/lib/buildbot/outputs/denise/aventuriers";
5in {
6 options.myServices.websites.denise.aventuriers.enable = lib.mkEnableOption "enable Denise's Aventuriers website";
7
8 config = lib.mkIf cfg.enable {
9 services.websites.env.production.vhostConfs.denise_aventuriers = {
10 certName = "denise";
11 addToCerts = true;
12 hosts = [ "aventuriers.syanni.eu" ];
13 root = varDir;
14 extraConfig = [
15 ''
16 <Directory ${varDir}>
17 DirectoryIndex index.html
18 Options Indexes FollowSymLinks MultiViews Includes
19 AllowOverride None
20 Require all granted
21 </Directory>
22 ''
23 ];
24 };
25 };
26}
diff --git a/nix/sources.json b/nix/sources.json
index 565d3a4..1722139 100644
--- a/nix/sources.json
+++ b/nix/sources.json
@@ -17,6 +17,18 @@
17 "url": "https://github.com/NixOS/nixpkgs-channels/archive/fce7562cf46727fdaf801b232116bc9ce0512049.tar.gz", 17 "url": "https://github.com/NixOS/nixpkgs-channels/archive/fce7562cf46727fdaf801b232116bc9ce0512049.tar.gz",
18 "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" 18 "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
19 }, 19 },
20 "buildbot-denise-aventuriers-nixpkgs": {
21 "branch": "nixos-unstable",
22 "description": "Frozen nixpkgs snapshot for texlive",
23 "homepage": "https://github.com/NixOS/nixpkgs",
24 "owner": "NixOS",
25 "repo": "nixpkgs-channels",
26 "rev": "8e2b14aceb1d40c7e8b84c03a7c78955359872bb",
27 "sha256": "0zzjpd9smr7rxzrdf6raw9kbj42fbvafxb5bz36lcxgv290pgsm8",
28 "type": "tarball",
29 "url": "https://github.com/NixOS/nixpkgs-channels/archive/8e2b14aceb1d40c7e8b84c03a7c78955359872bb.tar.gz",
30 "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
31 },
20 "buildbot-history-deps": { 32 "buildbot-history-deps": {
21 "ref": "master", 33 "ref": "master",
22 "repo": "ssh://gitolite@git.immae.eu/perso/Immae/Sites/History", 34 "repo": "ssh://gitolite@git.immae.eu/perso/Immae/Sites/History",