@@ -8,6 +8,7 @@ import re
|
||||
import sys
|
||||
from urllib.error import HTTPError
|
||||
|
||||
import qa_report
|
||||
import candidate_release as candidate
|
||||
import candidate_runtime as runtime
|
||||
import hifox_release_trigger as hfx
|
||||
@@ -118,6 +119,8 @@ def publish_candidate(plan, receipt, run):
|
||||
manual = (record.get('typeId') or (record.get('type') or {}).get('id')) == '1b7f1bb1-72c2-4106-b305-85604cf6d7e2'
|
||||
if manual:
|
||||
body += '\n候选已就绪。负责人可在本单切到「测试中」启动同包测试。'
|
||||
if single:
|
||||
body += '\nQA 请在测试机用 ~/.local/bin/kg-qa-report 从本轮用例清单生成报告,逐项填写结果和证据,正式候选无法登录时报告 blocked。'
|
||||
key = 'ready ' + receipt['bundle']
|
||||
add_comment(plan['task'], key, body)
|
||||
for item in plan['items']:
|
||||
@@ -185,6 +188,13 @@ def register(task_id):
|
||||
row = reports[item_id][0]
|
||||
cd.require(cd.matches(cd.UUID, row.get('id')) and obj.get('url', '').startswith('https://app.hifox.com/'),
|
||||
'invalid QA evidence link')
|
||||
if [item['task'] for item in plan['items']] == [task_id] and task_id in reports:
|
||||
accepted = cd.metadata(task(task_id), 'cd_acceptance') or {}
|
||||
if (accepted.get('sha'), accepted.get('bundle')) != (receipt['sha'], receipt['bundle']):
|
||||
try:
|
||||
qa_report.verify_report(reports[task_id][1])
|
||||
except ValueError as error:
|
||||
raise cd.CDError(f'QA 请在测试机提交逐项报告:{error}') from error
|
||||
candidate.check_qa(plan, receipt, reports, QA_AUTHORS)
|
||||
fresh = owner_plan(task_id)
|
||||
cd.require(fresh == plan, 'release plan changed during registration')
|
||||
|
||||
Reference in New Issue
Block a user