| |
@@ -167,7 +167,7 @@
|
| |
build_tags = self.koji.find_build_tags(tag)
|
| |
|
| |
if not build_tags:
|
| |
- log.warn("No build tag found for %s, not regen any repo", tag)
|
| |
+ log.warning("No build tag found for %s, not regen any repo", tag)
|
| |
else:
|
| |
log.info("Found build tags for '%s': %r", tag, build_tags)
|
| |
self.koji.regen_repos(build_tags, wait=self.wait_regen_repo)
|
| |
@@ -175,10 +175,24 @@
|
| |
return [modinfo.koji_tag], old_tags
|
| |
|
| |
def run(self):
|
| |
+ try:
|
| |
+ ci_message_string = get_env_var(self.args.module_from_env,
|
| |
+ raise_if_not_exist=True)
|
| |
+ ci_message = json.loads(ci_message_string)
|
| |
+ log.info('Received MBS state change message:\n%s',
|
| |
+ json.dumps(ci_message, indent=2, sort_keys=True))
|
| |
+
|
| |
+ except Exception as e:
|
| |
+ error = "Fail to load '{!s}' from os environ: {!s}".format(self.args.module_from_env, e)
|
| |
+ log.error(error)
|
| |
+ raise RuntimeError(error)
|
| |
+
|
| |
+ if ci_message.get('state_name', None) != 'ready':
|
| |
+ log.info("MBS build state is not 'ready', skipping")
|
| |
+ return
|
| |
+
|
| |
self.dry_run = self.args.dry_run
|
| |
self.send_mail = self.args.send_mail
|
| |
- self.module_from_env = self.args.module_from_env
|
| |
-
|
| |
self.tag_config_file = self.args.tag_config_file
|
| |
self.wait_regen_repo = self.args.wait_regen_repo
|
| |
|
| |
@@ -195,22 +209,6 @@
|
| |
self.connect_koji(dry_run=self.dry_run)
|
| |
self.connect_mbs()
|
| |
|
| |
- try:
|
| |
- ci_message_string = get_env_var(self.module_from_env,
|
| |
- raise_if_not_exist=True)
|
| |
- ci_message = json.loads(ci_message_string)
|
| |
- log.info('Received MBS state change message:\n%s',
|
| |
- json.dumps(ci_message, indent=2, sort_keys=True))
|
| |
-
|
| |
- except Exception as e:
|
| |
- error = "Fail to load '{!s}' from os environ: {!s}".format(self.module_from_env, e)
|
| |
- log.error(error)
|
| |
- raise RuntimeError(error)
|
| |
-
|
| |
- if ci_message.get('state_name', None) != 'ready':
|
| |
- log.info("MBS build state is not 'ready', skipping")
|
| |
- return
|
| |
-
|
| |
modinfo = ModuleInfo.from_mbs_message(self.mbs, ci_message)
|
| |
if self.send_mail:
|
| |
self.mail_data['module'] = modinfo.short_info
|
| |
@@ -219,8 +217,8 @@
|
| |
for tag, tag_config in self.tag_config.items():
|
| |
tag_owners = tag_config.get('owners', [])
|
| |
if not tag_owners:
|
| |
- log.warn("Sending mail is enabled, but no owners set for tag %s, "
|
| |
- "will not send mail", tag)
|
| |
+ log.warning("Sending mail is enabled, but no owners set for tag %s, "
|
| |
+ "will not send mail", tag)
|
| |
|
| |
conf_modules = tag_config.get('modules', [])
|
| |
try:
|
| |