aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/private/buildbot/projects/immaeEu/__init__.py29
-rw-r--r--modules/private/websites/immae/production.nix9
-rw-r--r--nix/sources.json2
m---------nixops/secrets0
4 files changed, 36 insertions, 4 deletions
diff --git a/modules/private/buildbot/projects/immaeEu/__init__.py b/modules/private/buildbot/projects/immaeEu/__init__.py
index f119b4f..83265cd 100644
--- a/modules/private/buildbot/projects/immaeEu/__init__.py
+++ b/modules/private/buildbot/projects/immaeEu/__init__.py
@@ -20,6 +20,7 @@ class E():
20 HISTORY_GIT_URL = "gitolite@git.immae.eu:perso/Immae/Sites/History" 20 HISTORY_GIT_URL = "gitolite@git.immae.eu:perso/Immae/Sites/History"
21 RECETTES_GIT_URL = "gitolite@git.immae.eu:perso/Immae/Sites/Recettes" 21 RECETTES_GIT_URL = "gitolite@git.immae.eu:perso/Immae/Sites/Recettes"
22 COURS_GIT_URL = "gitolite@git.immae.eu:perso/Immae/Sites/Cours" 22 COURS_GIT_URL = "gitolite@git.immae.eu:perso/Immae/Sites/Cours"
23 DOCS_GIT_URL = "gitolite@git.immae.eu:perso/Immae/Sites/Docs"
23 NORMALESUP_GIT_URL = "gitolite@git.immae.eu:perso/Immae/Projets/Sites/Normalesup" 24 NORMALESUP_GIT_URL = "gitolite@git.immae.eu:perso/Immae/Projets/Sites/Normalesup"
24 25
25 COURS_RELEASE_PATH = "/var/lib/buildbot/outputs/immae/cours" 26 COURS_RELEASE_PATH = "/var/lib/buildbot/outputs/immae/cours"
@@ -28,6 +29,7 @@ class E():
28 BIP39_RELEASE_PATH = "/var/lib/buildbot/outputs/immae/bip39" 29 BIP39_RELEASE_PATH = "/var/lib/buildbot/outputs/immae/bip39"
29 HISTORY_RELEASE_PATH = "/var/lib/buildbot/outputs/immae/history" 30 HISTORY_RELEASE_PATH = "/var/lib/buildbot/outputs/immae/history"
30 IMMAE_EU_RELEASE_PATH = "/var/lib/buildbot/outputs/immae/blog" 31 IMMAE_EU_RELEASE_PATH = "/var/lib/buildbot/outputs/immae/blog"
32 DOCS_RELEASE_PATH = "/var/lib/buildbot/outputs/immae/docs"
31 RECETTES_RELEASE_PATH = "/var/lib/buildbot/outputs/immae/recettes" 33 RECETTES_RELEASE_PATH = "/var/lib/buildbot/outputs/immae/recettes"
32 NORMALESUP_RELEASE_PATH = "/var/lib/buildbot/outputs/immae/recherche" 34 NORMALESUP_RELEASE_PATH = "/var/lib/buildbot/outputs/immae/recherche"
33 GSMCELLS_RELEASE_PATH = "/var/lib/ftp/release.immae.eu/gsm_cells" 35 GSMCELLS_RELEASE_PATH = "/var/lib/ftp/release.immae.eu/gsm_cells"
@@ -70,12 +72,13 @@ def configure(c):
70 c['schedulers'].append(hook_scheduler("Normalesup", timer=1)) 72 c['schedulers'].append(hook_scheduler("Normalesup", timer=1))
71 c['schedulers'].append(hook_scheduler("Cours", timer=1)) 73 c['schedulers'].append(hook_scheduler("Cours", timer=1))
72 c['schedulers'].append(hook_scheduler("Recettes", timer=1)) 74 c['schedulers'].append(hook_scheduler("Recettes", timer=1))
75 c['schedulers'].append(hook_scheduler("Docs", timer=1))
73 c['schedulers'].append(hook_scheduler("History", timer=1)) 76 c['schedulers'].append(hook_scheduler("History", timer=1))
74 c['schedulers'].append(hook_scheduler("BIP39", timer=1)) 77 c['schedulers'].append(hook_scheduler("BIP39", timer=1))
75 c['schedulers'].append(schedulers.Nightly(name="GSMCells-weekly", 78 c['schedulers'].append(schedulers.Nightly(name="GSMCells-weekly",
76 builderNames=["GSMCells_build"], dayOfWeek=6, hour=3)) 79 builderNames=["GSMCells_build"], dayOfWeek=6, hour=3))
77 c['schedulers'].append(force_scheduler("force_immae_eu", [ 80 c['schedulers'].append(force_scheduler("force_immae_eu", [
78 "ImmaeEu_build", "Normalesup_build", "Cours_build", 81 "ImmaeEu_build", "Normalesup_build", "Cours_build", "Docs_build",
79 "Recettes_build", "History_build", "BIP39_build" 82 "Recettes_build", "History_build", "BIP39_build"
80 ])) 83 ]))
81 c['schedulers'].append(schedulers.ForceScheduler( 84 c['schedulers'].append(schedulers.ForceScheduler(
@@ -99,13 +102,14 @@ def configure(c):
99 c['builders'].append(cours_factory()) 102 c['builders'].append(cours_factory())
100 c['builders'].append(gsm_cells_factory()) 103 c['builders'].append(gsm_cells_factory())
101 c['builders'].append(recettes_factory()) 104 c['builders'].append(recettes_factory())
105 c['builders'].append(docs_factory())
102 c['builders'].append(history_factory()) 106 c['builders'].append(history_factory())
103 c['builders'].append(bip39_factory()) 107 c['builders'].append(bip39_factory())
104 108
105 c['services'].append(SlackStatusPush( 109 c['services'].append(SlackStatusPush(
106 name="slack_status_immae_eu_project", 110 name="slack_status_immae_eu_project",
107 builders=[ 111 builders=[
108 "ImmaeEu_build", "Normalesup_build", "Cours_build", 112 "ImmaeEu_build", "Normalesup_build", "Cours_build", "Docs_build",
109 "GSMCells_build", "Recettes_build", "History_build", 113 "GSMCells_build", "Recettes_build", "History_build",
110 "BIP39_build" 114 "BIP39_build"
111 ], 115 ],
@@ -113,7 +117,7 @@ def configure(c):
113 c['services'].append(XMPPStatusPush( 117 c['services'].append(XMPPStatusPush(
114 name="xmpp_status_immae_eu_project", 118 name="xmpp_status_immae_eu_project",
115 builders=[ 119 builders=[
116 "ImmaeEu_build", "Normalesup_build", "Cours_build", 120 "ImmaeEu_build", "Normalesup_build", "Cours_build", "Docs_build",
117 "GSMCells_build", "Recettes_build", "History_build", 121 "GSMCells_build", "Recettes_build", "History_build",
118 "BIP39_build" 122 "BIP39_build"
119 ], 123 ],
@@ -139,6 +143,25 @@ def history_factory():
139 143
140 return util.BuilderConfig(name="History_build", workernames=["generic-worker-immae-eu"], factory=factory) 144 return util.BuilderConfig(name="History_build", workernames=["generic-worker-immae-eu"], factory=factory)
141 145
146def docs_factory():
147 path_env = {
148 "PATH": os.environ["BUILDBOT_PATH_Docs"] + ":${PATH}"
149 }
150 factory = util.BuildFactory()
151 factory.addStep(steps.Git(logEnviron=False, repourl=E.DOCS_GIT_URL,
152 submodules=True, sshPrivateKey=open(E.SSH_KEY_PATH).read().rstrip(),
153 sshHostKey=E.SSH_HOST_KEY, mode="full", method="copy"))
154 factory.addStep(steps.ShellCommand(name="build website",
155 logEnviron=False, haltOnFailure=True, workdir="source",
156 env=path_env, command=["make", "clean", "html"]))
157 factory.addStep(steps.MasterShellCommand(command="rm -rf {}".format(E.DOCS_RELEASE_PATH)))
158 factory.addStep(steps.DirectoryUpload(workersrc="../source/_build/html",
159 masterdest=E.DOCS_RELEASE_PATH,
160 url="https://www.immae.eu/docs"))
161 factory.addStep(steps.MasterShellCommand(command="chmod -R a+rX {}".format(E.DOCS_RELEASE_PATH)))
162
163 return util.BuilderConfig(name="Docs_build", workernames=["generic-worker-immae-eu"], factory=factory)
164
142def recettes_factory(): 165def recettes_factory():
143 path_env = { 166 path_env = {
144 "PATH": os.environ["BUILDBOT_PATH_Recettes"] + ":${PATH}" 167 "PATH": os.environ["BUILDBOT_PATH_Recettes"] + ":${PATH}"
diff --git a/modules/private/websites/immae/production.nix b/modules/private/websites/immae/production.nix
index ff9cf9d..8b4998f 100644
--- a/modules/private/websites/immae/production.nix
+++ b/modules/private/websites/immae/production.nix
@@ -6,6 +6,7 @@ let
6 rechercheDir = "/var/lib/buildbot/outputs/immae/recherche"; 6 rechercheDir = "/var/lib/buildbot/outputs/immae/recherche";
7 recettesDir = "/var/lib/buildbot/outputs/immae/recettes"; 7 recettesDir = "/var/lib/buildbot/outputs/immae/recettes";
8 historyDir = "/var/lib/buildbot/outputs/immae/history"; 8 historyDir = "/var/lib/buildbot/outputs/immae/history";
9 docsDir = "/var/lib/buildbot/outputs/immae/docs/";
9 env = config.myEnv.websites.immae; 10 env = config.myEnv.websites.immae;
10in { 11in {
11 options.myServices.websites.immae.production.enable = lib.mkEnableOption "enable Immae's website"; 12 options.myServices.websites.immae.production.enable = lib.mkEnableOption "enable Immae's website";
@@ -66,6 +67,14 @@ in {
66 Require all granted 67 Require all granted
67 </Directory> 68 </Directory>
68 69
70 Alias /docs ${docsDir}
71 <Directory ${docsDir}>
72 DirectoryIndex index.htm index.html
73 Options Indexes FollowSymLinks MultiViews Includes
74 AllowOverride All
75 Require all granted
76 </Directory>
77
69 Alias /eurl ${./eurl} 78 Alias /eurl ${./eurl}
70 <Directory ${./eurl}> 79 <Directory ${./eurl}>
71 DirectoryIndex index.htm index.html 80 DirectoryIndex index.htm index.html
diff --git a/nix/sources.json b/nix/sources.json
index bf1edce..bc49278 100644
--- a/nix/sources.json
+++ b/nix/sources.json
@@ -146,7 +146,7 @@
146 "webapps-landing": { 146 "webapps-landing": {
147 "ref": "gitolite_local/local_changes", 147 "ref": "gitolite_local/local_changes",
148 "repo": "https://git.immae.eu/github/bastienwirtz/homer.git", 148 "repo": "https://git.immae.eu/github/bastienwirtz/homer.git",
149 "rev": "136303aa36d7d97f27b5944ad7df3a3c14515d91", 149 "rev": "49b6104e9d0059b7990b3dcd53cca664d5cce7af",
150 "type": "git", 150 "type": "git",
151 "version": "e0a72b7-local" 151 "version": "e0a72b7-local"
152 }, 152 },
diff --git a/nixops/secrets b/nixops/secrets
Subproject d5068b2f6e4a8aa7e6e487b34eef0d90e7f547c Subproject 3b4bfa3cddc7f0621d1bec042a388c32e38245f