mirror of
https://github.com/odoo/runbot.git
synced 2025-03-27 13:25:47 +07:00
[IMP] runbot: log latest commit hash and message when server is built
When a server is built based on dependency_ids, only the branch refs was logged. In this situation, it's difficult to reproduce a build locally in the exact same conditions. With this commit, the latest commit hash and message of this branch is also logged.
This commit is contained in:
parent
0cb07e73db
commit
12542808a9
@ -514,6 +514,12 @@ class runbot_build(models.Model):
|
|||||||
'Building environment',
|
'Building environment',
|
||||||
'%s match branch %s of %s' % (server_match, closest_name, repo.name)
|
'%s match branch %s of %s' % (server_match, closest_name, repo.name)
|
||||||
)
|
)
|
||||||
|
latest_commit = repo._git(['rev-parse', closest_name]).strip()
|
||||||
|
commit_oneline = repo._git(['show', '--pretty="%H -- %s"', '-s', latest_commit]).strip()
|
||||||
|
build._log(
|
||||||
|
'Building environment',
|
||||||
|
'Server built based on commit %s from %s' % (commit_oneline, closest_name)
|
||||||
|
)
|
||||||
repo._git_export(closest_name, build._path())
|
repo._git_export(closest_name, build._path())
|
||||||
|
|
||||||
# Finally mark all addons to move to openerp/addons
|
# Finally mark all addons to move to openerp/addons
|
||||||
|
Loading…
Reference in New Issue
Block a user