IMMAE_EU_GIT_URL = "gitolite@git.immae.eu:perso/Immae/Sites/Blog"
HISTORY_GIT_URL = "gitolite@git.immae.eu:perso/Immae/Sites/History"
RECETTES_GIT_URL = "gitolite@git.immae.eu:perso/Immae/Sites/Recettes"
+ JARDIN_GIT_URL = "gitolite@git.immae.eu:perso/Immae/Sites/Jardin"
COURS_GIT_URL = "gitolite@git.immae.eu:perso/Immae/Sites/Cours"
DOCS_GIT_URL = "gitolite@git.immae.eu:perso/Immae/Sites/Docs"
NORMALESUP_GIT_URL = "gitolite@git.immae.eu:perso/Immae/Projets/Sites/Normalesup"
IMMAE_EU_RELEASE_PATH = "/var/lib/buildbot/outputs/immae/blog"
DOCS_RELEASE_PATH = "/var/lib/buildbot/outputs/immae/docs"
RECETTES_RELEASE_PATH = "/var/lib/buildbot/outputs/immae/recettes"
+ JARDIN_RELEASE_PATH = "/var/lib/buildbot/outputs/immae/jardin"
NORMALESUP_RELEASE_PATH = "/var/lib/buildbot/outputs/immae/recherche"
GSMCELLS_RELEASE_PATH = "/var/lib/ftp/release.immae.eu/gsm_cells"
GSMCELLS_RELEASE_URL = "https://release.immae.eu/gsm_cells"
withbranch.append(_configure("normalesup", normalesup_build_factory, c, worker_name))
withbranch.append(_configure("cours", cours_build_factory, c, worker_name))
withbranch.append(_configure("recettes", recettes_build_factory, c, worker_name))
+ withbranch.append(_configure("jardin", jardin_build_factory, c, worker_name))
withbranch.append(_configure("docs", docs_build_factory, c, worker_name))
withbranch.append(_configure("history", history_build_factory, c, worker_name))
withbranch.append(_configure("bip39", bip39_build_factory, c, worker_name))
return factory
+def jardin_build_factory():
+ path_env = {
+ "PATH": "/run/current-system/sw/bin"
+ }
+ factory = util.BuildFactory()
+ factory.addStep(steps.Git(logEnviron=False, repourl=E.JARDIN_GIT_URL,
+ submodules=True, sshPrivateKey=open(E.SSH_KEY_PATH).read().rstrip(),
+ sshHostKey=E.SSH_HOST_KEY, mode="full", method="fresh"))
+ factory.addStep(NixShellCommand(name="build website",
+ logEnviron=False, haltOnFailure=True,
+ env=path_env, command="jekyll build --trace --baseurl /jardin"))
+ factory.addStep(steps.MasterShellCommand(command="rm -rf {}".format(E.JARDIN_RELEASE_PATH)))
+ factory.addStep(steps.DirectoryUpload(workersrc="_site",
+ masterdest=E.JARDIN_RELEASE_PATH,
+ url="https://www.immae.eu/jardin"))
+ factory.addStep(steps.MasterShellCommand(command="chmod -R a+rX {}".format(E.JARDIN_RELEASE_PATH)))
+
+ return factory
+
def bip39_build_factory():
path_env = {
"PATH": "/run/current-system/sw/bin",
coursDir = "/var/lib/buildbot/outputs/immae/cours";
rechercheDir = "/var/lib/buildbot/outputs/immae/recherche";
recettesDir = "/var/lib/buildbot/outputs/immae/recettes";
+ jardinDir = "/var/lib/buildbot/outputs/immae/jardin";
historyDir = "/var/lib/buildbot/outputs/immae/history";
docsDir = "/var/lib/buildbot/outputs/immae/docs/";
env = config.myEnv.websites.immae;
Require all granted
</Directory>
+ Alias /jardin ${jardinDir}
+ <Directory ${jardinDir}>
+ DirectoryIndex index.htm index.html
+ Options Indexes FollowSymLinks MultiViews Includes
+ AllowOverride All
+ Require all granted
+ </Directory>
+
Alias /history ${historyDir}
<Directory ${historyDir}>
DirectoryIndex index.html