mirror of
https://github.com/odoo/runbot.git
synced 2025-03-15 23:45:44 +07:00
[IMP] runbot: add no_build on repo
When runbot is installed to test customs addons, we don't want to build all odoo commit, but we need to update branches in order to make _get_closest_branch work. This commit will allow a user to set odoo in poll mode with no_build set to True, to create branches only. (And a small fix for additionnal_env)
This commit is contained in:
parent
631b29fcf8
commit
a7992e9f50
@ -362,7 +362,7 @@ class ConfigStep(models.Model):
|
||||
cmd.finals.append(['gzip', '-f', self._perfs_data_path()]) # keep data but gz them to save disc space
|
||||
max_timeout = int(self.env['ir.config_parameter'].get_param('runbot.runbot_timeout', default=10000))
|
||||
timeout = min(self.cpu_limit, max_timeout)
|
||||
env_variables = self.additionnal_env.replace("'", '"').split(',') # remove '
|
||||
env_variables = self.additionnal_env.split(',') if self.additionnal_env else []
|
||||
return docker_run(cmd.build(), log_path, build._path(), build._get_docker_name(), cpu_limit=timeout, ro_volumes=exports, env_variables=env_variables)
|
||||
|
||||
def log_end(self, build):
|
||||
|
@ -68,6 +68,7 @@ class runbot_repo(models.Model):
|
||||
server_files = fields.Char('Server files', help='Comma separated list of possible server files') # odoo-bin,openerp-server,openerp-server.py
|
||||
manifest_files = fields.Char('Manifest files', help='Comma separated list of possible manifest files', default='__manifest__.py')
|
||||
addons_paths = fields.Char('Addons paths', help='Comma separated list of possible addons path', default='')
|
||||
no_build = fields.Boolean("No build", help="Forbid creation of build on this repo", default=False)
|
||||
|
||||
def _compute_config_id(self):
|
||||
for repo in self:
|
||||
@ -285,7 +286,7 @@ class runbot_repo(models.Model):
|
||||
|
||||
# create build (and mark previous builds as skipped) if not found
|
||||
if not (branch.id, sha) in builds_candidates:
|
||||
if branch.no_auto_build or branch.no_build:
|
||||
if branch.no_auto_build or branch.no_build or branch.repo_id.no_build:
|
||||
continue
|
||||
_logger.debug('repo %s branch %s new build found revno %s', self.name, branch.name, sha)
|
||||
build_info = {
|
||||
|
@ -14,6 +14,7 @@
|
||||
<field name="sequence"/>
|
||||
<field name="name"/>
|
||||
<field name="mode"/>
|
||||
<field name="no_build"/>
|
||||
<field name="nginx"/>
|
||||
<field name="duplicate_id"/>
|
||||
<field name="dependency_ids" widget="many2many_tags"/>
|
||||
|
Loading…
Reference in New Issue
Block a user