store git commit hash to build.source
Git HEAD commit hash is now stored in build.info field. this field is currently used by content generators, but not by other builds. Also original checked out url is stored in build.extra.url field. Fixes: https://pagure.io/koji/issue/550
This commit is contained in:
parent
c78a53167b
commit
4a96ee5474
2 changed files with 26 additions and 0 deletions
|
|
@ -868,6 +868,10 @@ class BuildTask(BaseTaskHandler):
|
|||
h = self.readSRPMHeader(srpm)
|
||||
data = koji.get_header_fields(h,['name','version','release','epoch'])
|
||||
data['task_id'] = self.id
|
||||
if getattr(self, 'source'):
|
||||
data['source'] = self.source['source']
|
||||
data['extra'] = {'url': self.source['url']}
|
||||
|
||||
extra_arches = None
|
||||
self.logger.info("Reading package config for %(name)s" % data)
|
||||
pkg_cfg = self.session.getPackageConfig(dest_tag,data['name'],event=self.event_id)
|
||||
|
|
@ -933,6 +937,7 @@ class BuildTask(BaseTaskHandler):
|
|||
parent=self.id)
|
||||
# wait for subtask to finish
|
||||
result = self.wait(task_id)[task_id]
|
||||
self.source = result['source']
|
||||
srpm = result['srpm']
|
||||
return srpm
|
||||
|
||||
|
|
@ -4565,6 +4570,7 @@ class BuildSRPMFromSCMTask(BaseBuildTask):
|
|||
'logs': ["%s/%s" % (uploadpath, os.path.basename(f))
|
||||
for f in log_files],
|
||||
'brootid': brootid,
|
||||
'source': scm.get_source(),
|
||||
}
|
||||
|
||||
class TagNotificationTask(BaseTaskHandler):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue