| |
@@ -5,6 +5,7 @@
|
| |
|
| |
import argparse
|
| |
import datetime
|
| |
+ import fedmsg.config
|
| |
import json
|
| |
import os
|
| |
import sys
|
| |
@@ -29,9 +30,21 @@
|
| |
commit = data['commitid']
|
| |
path = '%s/objects/%s/%s.commitmeta' % (repo, commit[:2], commit[2:])
|
| |
|
| |
+ config = fedmsg.config.load_config()
|
| |
+ config['active'] = True # Connect out to a fedmsg-relay instance
|
| |
+ config['cert_prefix'] = 'releng' # Use this cert.
|
| |
+ fedmsg.init(**config)
|
| |
+ topic = 'compose.%s' % opts.cmd.replace('-', '.').lower()
|
| |
+
|
| |
+ count = 0
|
| |
while not os.path.exists(path):
|
| |
print('%s: Commit not signed yet, waiting...'
|
| |
% datetime.datetime.utcnow())
|
| |
+ count += 1
|
| |
+ if count >= 60: # Repeat every 5 minutes
|
| |
+ print('Repeating notification')
|
| |
+ fedmsg.publish(topic=topic, modname='pungi', msg=data)
|
| |
+ count = 0
|
| |
time.sleep(5)
|
| |
|
| |
print('Found signature.')
|
| |
Signed-off-by: Patrick Uiterwijk puiterwijk@redhat.com