diff options
Diffstat (limited to 'modules/private/buildbot')
-rw-r--r-- | modules/private/buildbot/projects/denise/__init__.py | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/modules/private/buildbot/projects/denise/__init__.py b/modules/private/buildbot/projects/denise/__init__.py index c07655b..bd460d1 100644 --- a/modules/private/buildbot/projects/denise/__init__.py +++ b/modules/private/buildbot/projects/denise/__init__.py | |||
@@ -17,6 +17,9 @@ class E(): | |||
17 | OMS_RELEASE_PATH = "/var/lib/buildbot/outputs/denise/oms" | 17 | OMS_RELEASE_PATH = "/var/lib/buildbot/outputs/denise/oms" |
18 | OMS_GIT_URL = "gitolite@git.immae.eu:perso/Denise/oms" | 18 | OMS_GIT_URL = "gitolite@git.immae.eu:perso/Denise/oms" |
19 | 19 | ||
20 | AVENTURIERS_RELEASE_PATH = "/var/lib/buildbot/outputs/denise/aventuriers" | ||
21 | AVENTURIERS_GIT_URL = "https://git.immae.eu/perso/Denise/aventuriers.git" | ||
22 | |||
20 | # master.cfg | 23 | # master.cfg |
21 | SECRETS_FILE = os.getcwd() + "/secrets" | 24 | SECRETS_FILE = os.getcwd() + "/secrets" |
22 | LDAP_URL = "ldaps://ldap.immae.eu:636" | 25 | LDAP_URL = "ldaps://ldap.immae.eu:636" |
@@ -51,11 +54,13 @@ def configure(c): | |||
51 | c['workers'].append(worker.LocalWorker("generic-worker-denise")) | 54 | c['workers'].append(worker.LocalWorker("generic-worker-denise")) |
52 | 55 | ||
53 | c['schedulers'].append(hook_scheduler("DeniseOMS", timer=1)) | 56 | c['schedulers'].append(hook_scheduler("DeniseOMS", timer=1)) |
57 | c['schedulers'].append(hook_scheduler("DeniseAventuriers", timer=1)) | ||
54 | c['schedulers'].append(force_scheduler("force_denise", [ | 58 | c['schedulers'].append(force_scheduler("force_denise", [ |
55 | "DeniseOMS_build" | 59 | "DeniseOMS_build", "DeniseAventuriers_build" |
56 | ])) | 60 | ])) |
57 | 61 | ||
58 | c['builders'].append(denise_oms_factory()) | 62 | c['builders'].append(denise_oms_factory()) |
63 | c['builders'].append(denise_aventuriers_factory()) | ||
59 | 64 | ||
60 | def denise_oms_factory(): | 65 | def denise_oms_factory(): |
61 | factory = util.BuildFactory() | 66 | factory = util.BuildFactory() |
@@ -70,3 +75,31 @@ def denise_oms_factory(): | |||
70 | factory.addStep(steps.MasterShellCommand(command="kill $(cat /run/denise_oms/gunicorn.pid)")) | 75 | factory.addStep(steps.MasterShellCommand(command="kill $(cat /run/denise_oms/gunicorn.pid)")) |
71 | 76 | ||
72 | return util.BuilderConfig(name="DeniseOMS_build", workernames=["generic-worker-denise"], factory=factory) | 77 | return util.BuilderConfig(name="DeniseOMS_build", workernames=["generic-worker-denise"], factory=factory) |
78 | |||
79 | def denise_aventuriers_factory(): | ||
80 | path_env = { | ||
81 | "PATH": os.environ["BUILDBOT_PATH_Aventuriers"] + ":${PATH}" | ||
82 | } | ||
83 | |||
84 | factory = util.BuildFactory() | ||
85 | factory.addStep(steps.Git(logEnviron=False, repourl=E.AVENTURIERS_GIT_URL, | ||
86 | submodules=True, mode="full", method="copy")) | ||
87 | factory.addStep(steps.ShellCommand(name="build files", | ||
88 | logEnviron=False, haltOnFailure=True, workdir="source", | ||
89 | env=path_env, command=["make", "tout", "encyclo"])) | ||
90 | factory.addStep(steps.MasterShellCommand(command="rm -rf {}".format(E.AVENTURIERS_RELEASE_PATH))) | ||
91 | factory.addStep(steps.DirectoryUpload(workersrc="../source/html", | ||
92 | masterdest=E.AVENTURIERS_RELEASE_PATH, | ||
93 | url="https://aventuriers.syanni.eu")) | ||
94 | factory.addStep(steps.FileUpload(name="upload mobi file", workersrc="aventuriers.mobi", | ||
95 | workdir="source", masterdest=E.AVENTURIERS_RELEASE_PATH + "/aventuriers.mobi", | ||
96 | url="https://aventuriers.syanni.eu/aventuriers.mobi", mode=0o644)) | ||
97 | factory.addStep(steps.FileUpload(name="upload pdf file", workersrc="aventuriers.pdf", | ||
98 | workdir="source", masterdest=E.AVENTURIERS_RELEASE_PATH + "/aventuriers.pdf", | ||
99 | url="https://aventuriers.syanni.eu/aventuriers.pdf", mode=0o644)) | ||
100 | factory.addStep(steps.FileUpload(name="upload encyclo pdf file", workersrc="encyclo.pdf", | ||
101 | workdir="source", masterdest=E.AVENTURIERS_RELEASE_PATH + "/encyclo.pdf", | ||
102 | url="https://aventuriers.syanni.eu/encyclo.pdf", mode=0o644)) | ||
103 | factory.addStep(steps.MasterShellCommand(command="chmod -R a+rX {}".format(E.AVENTURIERS_RELEASE_PATH))) | ||
104 | |||
105 | return util.BuilderConfig(name="DeniseAventuriers_build", workernames=["generic-worker-denise"], factory=factory) | ||