mirror of
https://github.com/release-engineering/dist-git.git
synced 2025-02-23 23:12:55 +00:00
add 'fedmsgs' and 'old_paths' configuration variables
This commit is contained in:
parent
d40a3489eb
commit
8f08d577b0
2 changed files with 22 additions and 17 deletions
|
@ -2,7 +2,11 @@
|
||||||
git_author_name = Fedora Release Engineering
|
git_author_name = Fedora Release Engineering
|
||||||
git_author_email = rel-eng@lists.fedoraproject.org
|
git_author_email = rel-eng@lists.fedoraproject.org
|
||||||
|
|
||||||
cache_dir = /var/lib/dist-git/cache
|
cache_dir = /var/lib/dist-git/cache
|
||||||
gitroot_dir = /var/lib/dist-git/git
|
gitroot_dir = /var/lib/dist-git/git
|
||||||
gitolite = True
|
|
||||||
grok = True
|
gitolite = True
|
||||||
|
grok = True
|
||||||
|
fedmsgs = True
|
||||||
|
old_paths = True
|
||||||
|
nomd5 = True
|
||||||
|
|
|
@ -238,23 +238,24 @@ def main():
|
||||||
hash_type.upper(), checksum)
|
hash_type.upper(), checksum)
|
||||||
|
|
||||||
# Add the file to the old path, where fedpkg is currently looking for it
|
# Add the file to the old path, where fedpkg is currently looking for it
|
||||||
if hash_type == "md5":
|
if hash_type == "md5" and config['dist-git'].getboolean('old_paths', fallback=True):
|
||||||
hardlink(dest_file, old_path, username)
|
hardlink(dest_file, old_path, username)
|
||||||
|
|
||||||
# Emit a fedmsg message. Load the config to talk to the fedmsg-relay.
|
# Emit a fedmsg message. Load the config to talk to the fedmsg-relay.
|
||||||
try:
|
if config['dist-git'].getboolean('fedmsgs', fallback=True):
|
||||||
config = fedmsg.config.load_config([], None)
|
try:
|
||||||
config['active'] = True
|
config = fedmsg.config.load_config([], None)
|
||||||
config['endpoints']['relay_inbound'] = config['relay_inbound']
|
config['active'] = True
|
||||||
fedmsg.init(name="relay_inbound", cert_prefix="lookaside", **config)
|
config['endpoints']['relay_inbound'] = config['relay_inbound']
|
||||||
|
fedmsg.init(name="relay_inbound", cert_prefix="lookaside", **config)
|
||||||
|
|
||||||
topic = "lookaside.new"
|
topic = "lookaside.new"
|
||||||
msg = dict(name=name, md5sum=checksum,
|
msg = dict(name=name, md5sum=checksum,
|
||||||
filename=filename.split('/')[-1], agent=username,
|
filename=filename.split('/')[-1], agent=username,
|
||||||
path=msgpath)
|
path=msgpath)
|
||||||
fedmsg.publish(modname="git", topic=topic, msg=msg)
|
fedmsg.publish(modname="git", topic=topic, msg=msg)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print "Error with fedmsg", str(e)
|
print "Error with fedmsg", str(e)
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Add table
Reference in a new issue