+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)
+