summaryrefslogtreecommitdiff
path: root/firehose/plugin/firehose_plugin.py
diff options
context:
space:
mode:
Diffstat (limited to 'firehose/plugin/firehose_plugin.py')
-rw-r--r--firehose/plugin/firehose_plugin.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/firehose/plugin/firehose_plugin.py b/firehose/plugin/firehose_plugin.py
index 25e2eb4..fba1db3 100644
--- a/firehose/plugin/firehose_plugin.py
+++ b/firehose/plugin/firehose_plugin.py
@@ -31,7 +31,7 @@ def firehose_git(app):
username = (app.runcmd_unchecked(["git", "config", "--global", "user.name"]))[1].strip()
email = (app.runcmd_unchecked(["git", "config", "--global", "user.email"]))[1].strip()
app.runcmd(["git", "config", "--global", "user.name", "Firehose merge bot"])
- app.runcmd(["git", "config", "--global", "user.email", "firehose@merge.bot"])
+ app.runcmd(["git", "config", "--global", "user.email", "firehose@firehose.baserock.org"])
yield ()
finally:
app.runcmd(["git", "config", "--global", "user.name", username])
@@ -86,7 +86,7 @@ class FirehosePlugin(cliapp.Plugin):
for c in confs:
self.update_for_conf(c)
if self.updated_morphologies():
- self.commit_and_push()
+ self.commit_and_push(os.path.basename(fname.replace(".yaml", "")))
def make_path(self, *subpath):
return os.path.join(self.base_path, *subpath)
@@ -230,11 +230,13 @@ class FirehosePlugin(cliapp.Plugin):
return True
- def commit_and_push(self):
+ def commit_and_push(self, name):
+ commit_msg = 'Update to '+name+' ref in definitions.git'
+ branch_name = 'HEAD:refs/for/master/firehose/'+name
(code, out, err) = self.app.runcmd_unchecked(
- ['git', 'commit', '-a', '-m', 'Firehose test commit'],
+ ['git', 'commit', '-a', '-m', commit_msg],
cwd=self.gitpath)
if code == 0:
- self.app.runcmd(['git', 'push', 'origin', 'HEAD'],
- cwd=self.gitpath)
+ self.app.runcmd(['git', 'push', 'ssh://firehose@testgerrit.baserock.org:29418/baserock/baserock/definitions',
+ branch_name], cwd=self.gitpath)