HISTORY_GIT_URL = "gitolite@git.immae.eu:perso/Immae/Sites/History"
RECETTES_GIT_URL = "gitolite@git.immae.eu:perso/Immae/Sites/Recettes"
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"
COURS_RELEASE_PATH = "/var/lib/buildbot/outputs/immae/cours"
BIP39_RELEASE_PATH = "/var/lib/buildbot/outputs/immae/bip39"
HISTORY_RELEASE_PATH = "/var/lib/buildbot/outputs/immae/history"
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"
NORMALESUP_RELEASE_PATH = "/var/lib/buildbot/outputs/immae/recherche"
GSMCELLS_RELEASE_PATH = "/var/lib/ftp/release.immae.eu/gsm_cells"
c['schedulers'].append(hook_scheduler("Normalesup", timer=1))
c['schedulers'].append(hook_scheduler("Cours", timer=1))
c['schedulers'].append(hook_scheduler("Recettes", timer=1))
+ c['schedulers'].append(hook_scheduler("Docs", timer=1))
c['schedulers'].append(hook_scheduler("History", timer=1))
c['schedulers'].append(hook_scheduler("BIP39", timer=1))
c['schedulers'].append(schedulers.Nightly(name="GSMCells-weekly",
builderNames=["GSMCells_build"], dayOfWeek=6, hour=3))
c['schedulers'].append(force_scheduler("force_immae_eu", [
- "ImmaeEu_build", "Normalesup_build", "Cours_build",
+ "ImmaeEu_build", "Normalesup_build", "Cours_build", "Docs_build",
"Recettes_build", "History_build", "BIP39_build"
]))
c['schedulers'].append(schedulers.ForceScheduler(
c['builders'].append(cours_factory())
c['builders'].append(gsm_cells_factory())
c['builders'].append(recettes_factory())
+ c['builders'].append(docs_factory())
c['builders'].append(history_factory())
c['builders'].append(bip39_factory())
c['services'].append(SlackStatusPush(
name="slack_status_immae_eu_project",
builders=[
- "ImmaeEu_build", "Normalesup_build", "Cours_build",
+ "ImmaeEu_build", "Normalesup_build", "Cours_build", "Docs_build",
"GSMCells_build", "Recettes_build", "History_build",
"BIP39_build"
],
c['services'].append(XMPPStatusPush(
name="xmpp_status_immae_eu_project",
builders=[
- "ImmaeEu_build", "Normalesup_build", "Cours_build",
+ "ImmaeEu_build", "Normalesup_build", "Cours_build", "Docs_build",
"GSMCells_build", "Recettes_build", "History_build",
"BIP39_build"
],
return util.BuilderConfig(name="History_build", workernames=["generic-worker-immae-eu"], factory=factory)
+def docs_factory():
+ path_env = {
+ "PATH": os.environ["BUILDBOT_PATH_Docs"] + ":${PATH}"
+ }
+ factory = util.BuildFactory()
+ factory.addStep(steps.Git(logEnviron=False, repourl=E.DOCS_GIT_URL,
+ submodules=True, sshPrivateKey=open(E.SSH_KEY_PATH).read().rstrip(),
+ sshHostKey=E.SSH_HOST_KEY, mode="full", method="copy"))
+ factory.addStep(steps.ShellCommand(name="build website",
+ logEnviron=False, haltOnFailure=True, workdir="source",
+ env=path_env, command=["make", "clean", "html"]))
+ factory.addStep(steps.MasterShellCommand(command="rm -rf {}".format(E.DOCS_RELEASE_PATH)))
+ factory.addStep(steps.DirectoryUpload(workersrc="../source/_build/html",
+ masterdest=E.DOCS_RELEASE_PATH,
+ url="https://www.immae.eu/docs"))
+ factory.addStep(steps.MasterShellCommand(command="chmod -R a+rX {}".format(E.DOCS_RELEASE_PATH)))
+
+ return util.BuilderConfig(name="Docs_build", workernames=["generic-worker-immae-eu"], factory=factory)
+
def recettes_factory():
path_env = {
"PATH": os.environ["BUILDBOT_PATH_Recettes"] + ":${PATH}"