[FIX] runbot: fix cla step

This commit is contained in:
Xavier-Do 2019-05-18 14:20:05 +02:00
parent fce51d6dbe
commit 98913f6d39
2 changed files with 6 additions and 6 deletions

View File

@ -165,9 +165,9 @@ class ConfigStep(models.Model):
log_path = build._path('logs', '%s.txt' % self.name)
build.write({'job_start': now(), 'job_end': False}) # state, ...
build._log('run', 'Starting step %s from config %s' % (self.name, build.config_id.name), level='SEPARATOR')
return self._run_step(log_path, build)
return self._run_step(build, log_path)
def _run_step(self, log_path, build):
def _run_step(self, build, log_path):
if self.job_type == 'run_odoo':
return self._run_odoo_run(build, log_path)
if self.job_type == 'install_odoo':

View File

@ -10,15 +10,15 @@ from odoo import models, fields
_logger = logging.getLogger(__name__)
class Job(models.Model):
class Step(models.Model):
_inherit = "runbot.build.config.step"
job_type = fields.Selection(selection_add=[('cla_check', 'Check cla')])
def _run_step(self, build, log_path):
if self.job_type != 'cla_check':
if self.job_type == 'cla_check':
return self._runbot_cla_check(build, log_path)
return super(Job, self)._run_step(build, log_path)
return super(Step, self)._run_step(build, log_path)
def _runbot_cla_check(self, build, log_path):
cla_glob = glob.glob(build._path("doc/cla/*/*.md"))