mirror of
https://github.com/odoo/runbot.git
synced 2025-03-30 23:05:44 +07:00
[IMP] runbot: add log on separator
This commit is contained in:
parent
77f8c29091
commit
87366de213
@ -251,7 +251,12 @@ class ConfigStep(models.Model):
|
|||||||
def _run(self, build):
|
def _run(self, build):
|
||||||
log_path = build._path('logs', '%s.txt' % self.name)
|
log_path = build._path('logs', '%s.txt' % self.name)
|
||||||
build.write({'job_start': now(), 'job_end': False}) # state, ...
|
build.write({'job_start': now(), 'job_end': False}) # state, ...
|
||||||
build._log('run', 'Starting step **%s** from config **%s**' % (self.name, build.params_id.config_id.name), log_type='markdown', level='SEPARATOR')
|
log_link = ''
|
||||||
|
if self._has_log():
|
||||||
|
log_url = f'http://{build.host}'
|
||||||
|
url = f"{log_url}/runbot/static/build/{build.dest}/logs/{self.name}.txt"
|
||||||
|
log_link = f'[@icon-file-text]({url})'
|
||||||
|
build._log('run', 'Starting step **%s** from config **%s** %s' % (self.name, build.params_id.config_id.name, log_link), log_type='markdown', level='SEPARATOR')
|
||||||
self._run_step(build, log_path)
|
self._run_step(build, log_path)
|
||||||
|
|
||||||
def _run_step(self, build, log_path, **kwargs):
|
def _run_step(self, build, log_path, **kwargs):
|
||||||
|
Loading…
Reference in New Issue
Block a user