代码拉取完成,页面将自动刷新
同步操作将从 ydna0/oepkgsbuild_check 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#import logging.config
#import argparse
#import time
class CommentMessage(object):
"""
the result in table to comment
"""
def __init__(self,result0,result1):
"""
:param result0: the aarch64 build result
:param result1: the x86_64 build result
"""
self._result0=result0
self._result1=result1
@classmethod
def table_head(cls):
"""
the head of the table
| Arch | Check Arch | Build_Result | Result_Detail |
"""
return "<tr><th>Arch</th> <th>Check Arch</th> <th>Build_Result</th> <th>Result_Detail</th> </tr>"
@classmethod
def table_content(cls, arch, check_arch, result, build_num):
"""
the content of the table
:param build_num: jenkins build id
"""
href = "https://jenkins.openeuler.isrc.ac.cn/job/OepkgsNetCheck/{}/console".format(build_num)
return "<tr><td>{}</td> <td>{}</td> <td>{}</td>" \
"<td><a href={}>{}{}</a></td></tr></tr>".format(arch, check_arch, result, href, "#", build_num)
def build_table(self, build_num):
"""
get the build result
:param build_num: jenkins build id
:return:
the final table
"""
comments = ["<table>", self.table_head()]
result_table = self.get_result_table(build_num)
comments.extend(result_table)
comments.append("</table>")
return comments
def get_result_table(self, build_num):
"""
:param build_num: jenkins build id
:return:
the build result table
"""
comments = []
line1=self.__class__.table_content("aarch64", "Yes", self._result0, build_num)
line2=self.__class__.table_content("x86_64", "Yes", self._result1, build_num)
comments.append(line1)
comments.append(line2)
return comments
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。