<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/ff18166be63a5a6ad7b67be82c4b06c2a281da88">https://github.com/macports/macports-infrastructure/commit/ff18166be63a5a6ad7b67be82c4b06c2a281da88</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit ff18166be63a5a6ad7b67be82c4b06c2a281da88
</span>Author: Rainer Müller <raimue@macports.org>
AuthorDate: Sat Mar 10 18:04:13 2018 +0100
<span style='display:block; white-space:pre;color:#404040;'> buildbot: Load secrets from secrets.json
</span>---
buildbot/master.cfg | 8 ++++++++
buildbot/secrets.json.sample | 3 +++
2 files changed, 11 insertions(+)
<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 a7cf6f2..25d7ade 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;'>@@ -67,6 +67,7 @@ config = {
</span>
# External configuration. Use absolute paths when overriding these.
'configfile': _path('config.json'),
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ 'secretsfile': _path('secrets.json'),
</span> 'workersfile': _path('slaves.json'),
'htpasswdfile': _path('htpasswd'),
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -117,6 +118,13 @@ except IOError:
</span> extconfig = {}
config.update(extconfig)
<span style='display:block; white-space:pre;background:#e0ffe0;'>+# Load secrets from external file
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+try:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ with open(config['secretsfile']) as f:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ secrets = json.load(f)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+except IOError:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ secrets = {}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> path_base = '/usr/bin:/bin:/usr/sbin:/sbin'
path_ports = os.path.join(config['toolsprefix'], 'bin') + ':' + path_base
path_jobs = os.path.join(config['jobstoolsprefix'], 'bin') + ':' + path_base
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/buildbot/secrets.json.sample b/buildbot/secrets.json.sample
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 0000000..e437e9e
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/buildbot/secrets.json.sample
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,3 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "githubapitoken": ""
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span></pre><pre style='margin:0'>
</pre>