mirror of
https://github.com/odoo/runbot.git
synced 2025-03-15 15:35:46 +07:00
[FIX] runbot, runbot_cla: clearly notify pending builds
Avoids confusing users with an all-green CLA mark for a build that is only starting. + Do CLA check as first step, no need to wait
This commit is contained in:
parent
d65b59f47b
commit
2486921a60
@ -739,7 +739,9 @@ class runbot_build(osv.osv):
|
||||
runbot_domain = self.pool['runbot.repo'].domain(cr, uid)
|
||||
for build in self.browse(cr, uid, ids, context=context):
|
||||
desc = "runbot build %s" % (build.dest,)
|
||||
if build.state in ('running', 'done'):
|
||||
if build.state == 'testing':
|
||||
state = 'pending'
|
||||
elif build.state in ('running', 'done'):
|
||||
state = 'error'
|
||||
if build.result == 'ok':
|
||||
state = 'success'
|
||||
@ -759,6 +761,7 @@ class runbot_build(osv.osv):
|
||||
|
||||
def job_10_test_base(self, cr, uid, build, lock_path, log_path):
|
||||
build._log('test_base', 'Start test base module')
|
||||
build.github_status()
|
||||
# checkout source
|
||||
build.checkout()
|
||||
# run base test
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
import glob
|
||||
import logging
|
||||
import os
|
||||
import re
|
||||
|
||||
import openerp
|
||||
@ -12,7 +11,9 @@ _logger = logging.getLogger(__name__)
|
||||
class runbot_build(openerp.models.Model):
|
||||
_inherit = "runbot.build"
|
||||
|
||||
def job_15_check_cla(self, cr, uid, build, lock_path, log_path):
|
||||
def job_05_check_cla(self, cr, uid, build, lock_path, log_path):
|
||||
# notify pending build - avoid confusing users by saying it's all green
|
||||
build.github_status()
|
||||
cla_glob = glob.glob(build.path("doc/cla/*/*.md"))
|
||||
if cla_glob:
|
||||
cla = ''.join(open(f).read() for f in cla_glob)
|
||||
|
Loading…
Reference in New Issue
Block a user