本文整理汇总了Python中jenkins.Jenkins.url方法的典型用法代码示例。如果您正苦于以下问题:Python Jenkins.url方法的具体用法?Python Jenkins.url怎么用?Python Jenkins.url使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类jenkins.Jenkins
的用法示例。
在下文中一共展示了Jenkins.url方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: jenkins_connection
# 需要导入模块: from jenkins import Jenkins [as 别名]
# 或者: from jenkins.Jenkins import url [as 别名]
def jenkins_connection():
""" Return an initialized python-jenkins object. """
configp = config()
try:
user = configp.get('rhcephpkg', 'user')
token = configp.get('rhcephpkg.jenkins', 'token')
url = configp.get('rhcephpkg.jenkins', 'url')
except configparser.Error as err:
raise SystemExit('Problem parsing .rhcephpkg.conf: %s',
err.message)
jenkins = Jenkins(url, username=user, password=token)
# These "password" and "url" attributes are not formally part of
# python-jenkins' API, but they are nice to make available to consumers
# (for logging/debugging, for example.)
jenkins.password = token
jenkins.url = url
return jenkins