mirror of
https://github.com/odoo/runbot.git
synced 2025-03-15 15:35:46 +07:00
wip
This commit is contained in:
parent
9097aa4545
commit
6866607d10
@ -6,7 +6,7 @@
|
|||||||
'author': "Odoo SA",
|
'author': "Odoo SA",
|
||||||
'website': "http://runbot.odoo.com",
|
'website': "http://runbot.odoo.com",
|
||||||
'category': 'Website',
|
'category': 'Website',
|
||||||
'version': '5.9',
|
'version': '5.10',
|
||||||
'application': True,
|
'application': True,
|
||||||
'depends': ['base', 'base_automation', 'website'],
|
'depends': ['base', 'base_automation', 'website'],
|
||||||
'data': [
|
'data': [
|
||||||
|
3
runbot/migrations/18.0.5.10/pre-migration.py
Normal file
3
runbot/migrations/18.0.5.10/pre-migration.py
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
def migrate(cr, version):
|
||||||
|
cr.execute("UPDATE runbot_build set local_state='killed' where local_state='manually_killed')
|
||||||
|
cr.execute("UPDATE runbot_build set global_state='killed' where global_state='manually_killed')
|
@ -147,7 +147,7 @@ class Batch(models.Model):
|
|||||||
domain += [('host', '=', self.bundle_id.host_id.name), ('keep_host', '=', True)]
|
domain += [('host', '=', self.bundle_id.host_id.name), ('keep_host', '=', True)]
|
||||||
build = self.env['runbot.build'].search(domain, limit=1, order='id desc')
|
build = self.env['runbot.build'].search(domain, limit=1, order='id desc')
|
||||||
link_type = 'matched'
|
link_type = 'matched'
|
||||||
killed_states = ('skipped', 'killed', 'manually_killed')
|
killed_states = ('skipped', 'killed')
|
||||||
if build and build.local_result not in killed_states and build.global_result not in killed_states:
|
if build and build.local_result not in killed_states and build.global_result not in killed_states:
|
||||||
if build.killable:
|
if build.killable:
|
||||||
build.killable = False
|
build.killable = False
|
||||||
|
@ -28,7 +28,7 @@ from odoo.tools.safe_eval import safe_eval
|
|||||||
|
|
||||||
_logger = logging.getLogger(__name__)
|
_logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
result_order = ['ok', 'warn', 'ko', 'skipped', 'killed', 'manually_killed']
|
result_order = ['ok', 'warn', 'ko', 'skipped', 'killed']
|
||||||
state_order = ['pending', 'testing', 'waiting', 'running', 'done']
|
state_order = ['pending', 'testing', 'waiting', 'running', 'done']
|
||||||
|
|
||||||
COPY_WHITELIST = [
|
COPY_WHITELIST = [
|
||||||
@ -414,7 +414,7 @@ class BuildResult(models.Model):
|
|||||||
def _result_multi(self):
|
def _result_multi(self):
|
||||||
if all(build.global_result == 'ok' or not build.global_result for build in self):
|
if all(build.global_result == 'ok' or not build.global_result for build in self):
|
||||||
return 'ok'
|
return 'ok'
|
||||||
if any(build.global_result in ('skipped', 'killed', 'manually_killed') for build in self):
|
if any(build.global_result in ('skipped', 'killed') for build in self):
|
||||||
return 'killed'
|
return 'killed'
|
||||||
if any(build.global_result == 'ko' for build in self):
|
if any(build.global_result == 'ko' for build in self):
|
||||||
return 'ko'
|
return 'ko'
|
||||||
@ -680,7 +680,7 @@ class BuildResult(models.Model):
|
|||||||
if build.requested_action == 'deathrow':
|
if build.requested_action == 'deathrow':
|
||||||
result = None
|
result = None
|
||||||
if build.local_state != 'running' and build.global_result not in ('warn', 'ko'):
|
if build.local_state != 'running' and build.global_result not in ('warn', 'ko'):
|
||||||
result = 'manually_killed'
|
result = 'killed'
|
||||||
build._kill(result=result)
|
build._kill(result=result)
|
||||||
return
|
return
|
||||||
|
|
||||||
@ -1226,7 +1226,7 @@ class BuildResult(models.Model):
|
|||||||
if self.global_result == 'ok':
|
if self.global_result == 'ok':
|
||||||
return 'success'
|
return 'success'
|
||||||
|
|
||||||
if self.global_result in ('skipped', 'killed', 'manually_killed'):
|
if self.global_result in ('skipped', 'killed'):
|
||||||
return 'secondary'
|
return 'secondary'
|
||||||
return 'default'
|
return 'default'
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
<meta http-equiv="refresh" t-att-content="refresh"/>
|
<meta http-equiv="refresh" t-att-content="refresh"/>
|
||||||
</t>
|
</t>
|
||||||
|
|
||||||
<t t-if="not page_info_state or page_info_state == 'ok' or page_info_state not in ('warn', 'ko', 'skipped', 'killed', 'manually_killed')">
|
<t t-if="not page_info_state or page_info_state == 'ok' or page_info_state not in ('warn', 'ko', 'skipped', 'killed')">
|
||||||
<link rel="icon" type="image/png" href="/runbot/static/src/img/icon_ok.png"/>
|
<link rel="icon" type="image/png" href="/runbot/static/src/img/icon_ok.png"/>
|
||||||
<link rel="icon" type="image/svg+xml" href="/runbot/static/src/img/icon_ok.svg"/>
|
<link rel="icon" type="image/svg+xml" href="/runbot/static/src/img/icon_ok.svg"/>
|
||||||
</t>
|
</t>
|
||||||
@ -35,7 +35,7 @@
|
|||||||
<link rel="icon" type="image/png" href="/runbot/static/src/img/icon_skipped.png"/>
|
<link rel="icon" type="image/png" href="/runbot/static/src/img/icon_skipped.png"/>
|
||||||
<link rel="icon" type="image/svg+xml" href="/runbot/static/src/img/icon_skipped.svg"/>
|
<link rel="icon" type="image/svg+xml" href="/runbot/static/src/img/icon_skipped.svg"/>
|
||||||
</t>
|
</t>
|
||||||
<t t-elif="page_info_state == 'killed' or page_info_state == 'manually_killed'">
|
<t t-elif="page_info_state == 'killed'">
|
||||||
<link rel="icon" type="image/png" href="/runbot/static/src/img/icon_killed.png"/>
|
<link rel="icon" type="image/png" href="/runbot/static/src/img/icon_killed.png"/>
|
||||||
<link rel="icon" type="image/svg+xml" href="/runbot/static/src/img/icon_killed.svg"/>
|
<link rel="icon" type="image/svg+xml" href="/runbot/static/src/img/icon_killed.svg"/>
|
||||||
</t>
|
</t>
|
||||||
@ -280,7 +280,7 @@
|
|||||||
<t t-if="build.global_result == 'skipped'">
|
<t t-if="build.global_result == 'skipped'">
|
||||||
<t t-set="rowclass">default</t>
|
<t t-set="rowclass">default</t>
|
||||||
</t>
|
</t>
|
||||||
<t t-if="build.global_result in ['killed', 'manually_killed']">
|
<t t-if="build.global_result in ['killed']">
|
||||||
<t t-set="rowclass">killed</t>
|
<t t-set="rowclass">killed</t>
|
||||||
</t>
|
</t>
|
||||||
</t>
|
</t>
|
||||||
|
Loading…
Reference in New Issue
Block a user