diff options
Diffstat (limited to 'modules/private/buildbot/projects/denise/__init__.py')
-rw-r--r-- | modules/private/buildbot/projects/denise/__init__.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/modules/private/buildbot/projects/denise/__init__.py b/modules/private/buildbot/projects/denise/__init__.py index 20ba913..2a19ef5 100644 --- a/modules/private/buildbot/projects/denise/__init__.py +++ b/modules/private/buildbot/projects/denise/__init__.py | |||
@@ -72,6 +72,13 @@ def denise_oms_factory(): | |||
72 | return "/run/denise_oms_beta/gunicorn.pid" | 72 | return "/run/denise_oms_beta/gunicorn.pid" |
73 | 73 | ||
74 | @util.renderer | 74 | @util.renderer |
75 | def oms_systemd_service(props): | ||
76 | if props.hasProperty("branch") and len(props["branch"]) > 0 and props["branch"] == "master": | ||
77 | return "denise-oms" | ||
78 | else: | ||
79 | return "denise-oms-beta" | ||
80 | |||
81 | @util.renderer | ||
75 | def oms_url(props): | 82 | def oms_url(props): |
76 | if props.hasProperty("branch") and len(props["branch"]) > 0 and props["branch"] == "master": | 83 | if props.hasProperty("branch") and len(props["branch"]) > 0 and props["branch"] == "master": |
77 | return "https://oms.syanni.eu" | 84 | return "https://oms.syanni.eu" |
@@ -94,7 +101,7 @@ def denise_oms_factory(): | |||
94 | masterdest=oms_path, | 101 | masterdest=oms_path, |
95 | url=oms_url)) | 102 | url=oms_url)) |
96 | factory.addStep(steps.MasterShellCommand(command=util.Interpolate("chmod -R a+rX %(kw:oms_path)s", oms_path=oms_path))) | 103 | factory.addStep(steps.MasterShellCommand(command=util.Interpolate("chmod -R a+rX %(kw:oms_path)s", oms_path=oms_path))) |
97 | factory.addStep(steps.MasterShellCommand(command=util.Interpolate("kill $(cat %(kw:oms_run_path)s)", oms_run_path=oms_run_path))) | 104 | factory.addStep(steps.MasterShellCommand(command=util.Interpolate("/run/wrappers/bin/sudo systemctl restart %(kw:oms_service)s.service", oms_service=oms_systemd_service))) |
98 | 105 | ||
99 | return util.BuilderConfig(name="DeniseOMS_build", workernames=["generic-worker-denise"], factory=factory) | 106 | return util.BuilderConfig(name="DeniseOMS_build", workernames=["generic-worker-denise"], factory=factory) |
100 | 107 | ||