[IMP] runbot: forced host improvement

This commit is contained in:
Xavier-Do 2022-06-10 13:26:27 +02:00
parent f654738b04
commit 1879f2c235
2 changed files with 7 additions and 1 deletions

View File

@ -117,7 +117,10 @@ class Batch(models.Model):
Create a build with given params_id if it does not already exists.
In the case that a very same build already exists that build is returned
"""
build = self.env['runbot.build'].search([('params_id', '=', params.id), ('parent_id', '=', False)], limit=1, order='id desc')
domain = [('params_id', '=', params.id), ('parent_id', '=', False)]
if self.bundle_id.host_id:
domain += [('host', '=', self.bundle_id.host_id.name), ('keep_host', '=', True)]
build = self.env['runbot.build'].search(domain, limit=1, order='id desc')
link_type = 'matched'
if build:
if build.killable:

View File

@ -57,6 +57,9 @@
<t t-call="runbot.branch_github_menu"/>
</div>
</div>
<div t-if="bundle.host_id">
<span class="badge badge-info" t-esc="bundle.host_id.name"></span>
</div>
</div>
<div class="col-md-9 col-lg-10">
<div class="row no-gutters">