jenkins-cobertura.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:bob 作者: BobBuildTool 项目源码 文件源码
def checkCobertura(config, checkoutSteps, buildSteps, packageSteps, **kwargs):
    found = False
    for s in checkoutSteps:
        if s.getPackage().getName().endswith("unittests"): found = True
    for s in buildSteps:
        if s.getPackage().getName().endswith("unittests"): found = True
    for s in packageSteps:
        if s.getPackage().getName().endswith("unittests"): found = True

    if found:
        root = ElementTree.fromstring(config)
        publishers = root.find("publishers")
        if publishers.find("hudson.plugins.cobertura.CoberturaPublisher") is None:
            publishers.append(PLUGIN)
            config = ElementTree.tostring(root, encoding="UTF-8")

    return config
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号