<pre style='margin:0'>
Rainer Müller (raimue) pushed a commit to branch master
in repository macports-infrastructure.
</pre>
<p><a href="https://github.com/macports/macports-infrastructure/commit/7d80d15eab71a08b5a2a3d0887d5614ad9477c74">https://github.com/macports/macports-infrastructure/commit/7d80d15eab71a08b5a2a3d0887d5614ad9477c74</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 7d80d15eab71a08b5a2a3d0887d5614ad9477c74
</span>Author: Rainer Müller <raimue@macports.org>
AuthorDate: Wed Nov 16 22:52:58 2016 +0100
<span style='display:block; white-space:pre;color:#404040;'> buildbot: Upload PortIndex.sql directly into DB
</span>---
buildbot/config.json.sample | 1 -
buildbot/master.cfg | 15 ++++++++++++---
2 files changed, 12 insertions(+), 4 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/buildbot/config.json.sample b/buildbot/config.json.sample
</span><span style='display:block; white-space:pre;color:#808080;'>index 55e972c..99b5b0d 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/buildbot/config.json.sample
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/buildbot/config.json.sample
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -17,7 +17,6 @@
</span> "user": "",
"sshkeyfile": "",
"sshknownhostsfile": "ssh_known_hosts",
<span style='display:block; white-space:pre;background:#ffe0e0;'>- "destpath": ""
</span> },
"guide": {
"host": "",
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/buildbot/master.cfg b/buildbot/master.cfg
</span><span style='display:block; white-space:pre;color:#808080;'>index 5dc03cd..841af5a 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/buildbot/master.cfg
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/buildbot/master.cfg
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -517,6 +517,16 @@ class RsyncDeployStep(steps.ShellCommand):
</span> env={'RSYNC_RSH': 'ssh -i ssh_key -oUserKnownHostsFile=ssh_known_hosts'},
**kwargs)
<span style='display:block; white-space:pre;background:#e0ffe0;'>+class PostgresDeployStep(steps.ShellCommand):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ def __init__(self, host, user, sqlfile, **kwargs):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ super(PostgresDeployStep, self).__init__(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ name='psql',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ description='deploying',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ descriptionDone='deployed',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ command='ssh -i ssh_key -oUserKnownHostsFile=ssh_known_hosts %s@%s psql < %s' % (user, host, sqlfile),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ **kwargs)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span>
def make_ssh_deploy_step(sshkeyfile, sshknownhostsfile, step):
return (
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -589,11 +599,10 @@ if 'portindex' in config['deploy']:
</span> make_ssh_deploy_step(
sshkeyfile=config['deploy']['portindex']['sshkeyfile'],
sshknownhostsfile=config['deploy']['portindex']['sshknownhostsfile'],
<span style='display:block; white-space:pre;background:#ffe0e0;'>- step=RsyncDeployStep(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ step=PostgresDeployStep(
</span> host=config['deploy']['portindex']['host'],
user=config['deploy']['portindex']['user'],
<span style='display:block; white-space:pre;background:#ffe0e0;'>- srcpath='PortIndex.sql',
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- destpath=config['deploy']['portindex']['destpath'])))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sqlfile='PortIndex.sql')))
</span>
if 'guide' in config['deploy']:
jobs_guide_factory = util.BuildFactory()
</pre><pre style='margin:0'>
</pre>