本文整理汇总了Python中jenkinsapi.fingerprint.Fingerprint.validate_for_build方法的典型用法代码示例。如果您正苦于以下问题:Python Fingerprint.validate_for_build方法的具体用法?Python Fingerprint.validate_for_build怎么用?Python Fingerprint.validate_for_build使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类jenkinsapi.fingerprint.Fingerprint
的用法示例。
在下文中一共展示了Fingerprint.validate_for_build方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _verify_download
# 需要导入模块: from jenkinsapi.fingerprint import Fingerprint [as 别名]
# 或者: from jenkinsapi.fingerprint.Fingerprint import validate_for_build [as 别名]
def _verify_download(self, fspath):
"""
Verify that a downloaded object has a valid fingerprint.
"""
local_md5 = self._md5sum(fspath)
fp = Fingerprint(self.build.job.jenkins.baseurl, local_md5, self.build.job.jenkins)
return fp.validate_for_build(os.path.basename(fspath), self.build.job.name, self.build.buildno)
示例2: _verify_download
# 需要导入模块: from jenkinsapi.fingerprint import Fingerprint [as 别名]
# 或者: from jenkinsapi.fingerprint.Fingerprint import validate_for_build [as 别名]
def _verify_download(self, fspath, strict_validation):
"""
Verify that a downloaded object has a valid fingerprint.
"""
local_md5 = self._md5sum(fspath)
baseurl = self.build.job.jenkins.baseurl
fp = Fingerprint(baseurl, local_md5, self.build.job.jenkins)
valid = fp.validate_for_build(os.path.basename(fspath), self.build.job.name, self.build.buildno)
if not valid or (fp.unknown and strict_validation): # strict = 404 as invalid
raise ArtifactBroken("Artifact %s seems to be broken, check %s" % (local_md5, baseurl))
return True
示例3: validate_fingerprint_for_build
# 需要导入模块: from jenkinsapi.fingerprint import Fingerprint [as 别名]
# 或者: from jenkinsapi.fingerprint.Fingerprint import validate_for_build [as 别名]
def validate_fingerprint_for_build(self, digest, filename, job, build):
obj_fingerprint = Fingerprint(self.baseurl, digest, jenkins_obj=self)
return obj_fingerprint.validate_for_build(filename, job, build)