X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=flakes%2Fprivate%2Fbuildbot%2Fprojects%2FimmaeEu%2F__init__.py;h=00c922746a9ed3b52bee0d07e659be24cb10e238;hb=b63d55f3ab7828a0ebbd04e2f901d98f4b427f0b;hpb=420ca31ba31007c6802389ad01e7b04be7f1f618;p=perso%2FImmae%2FConfig%2FNix.git diff --git a/flakes/private/buildbot/projects/immaeEu/__init__.py b/flakes/private/buildbot/projects/immaeEu/__init__.py index f55250d..00c9227 100644 --- a/flakes/private/buildbot/projects/immaeEu/__init__.py +++ b/flakes/private/buildbot/projects/immaeEu/__init__.py @@ -21,6 +21,7 @@ class E(): 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" @@ -33,6 +34,7 @@ class E(): 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" @@ -63,6 +65,7 @@ def configure(c): 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)) @@ -274,6 +277,25 @@ def recettes_build_factory(): 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",