本文整理汇总了Python中config.Configuration.validate方法的典型用法代码示例。如果您正苦于以下问题:Python Configuration.validate方法的具体用法?Python Configuration.validate怎么用?Python Configuration.validate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类config.Configuration
的用法示例。
在下文中一共展示了Configuration.validate方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: expanduser
# 需要导入模块: from config import Configuration [as 别名]
# 或者: from config.Configuration import validate [as 别名]
from config import Configuration
parser = argparse.ArgumentParser(description='Library release tagger - tag non-snapshot libraries')
parser.add_argument('-v', '--verbose', action='store_true', help='Print debug output')
parser.add_argument('projectName', type=str, help='The jenkins build of the repo we want to tag')
parser.add_argument('buildNumber', type=str, help='The jenkins build number we want to tag')
args = parser.parse_args()
WORKSPACE = expanduser("~/.release")
if os.path.exists(WORKSPACE):
shutil.rmtree(WORKSPACE)
os.mkdir(WORKSPACE)
conf = Configuration()
conf.validate()
jenkins = Jenkins(conf.jenkins, conf.jenkins_user, conf.jenkins_key)
def verbose(message):
if args.verbose:
print(message)
def run():
jenkins_project = args.projectName
jenkins_build_number = args.buildNumber
if not jenkins.find_if_build_is_green(jenkins_project, jenkins_build_number):
print("Build #" + jenkins_build_number + " of '" + jenkins_project + "' is not a green build.")