当前位置: 首页>>代码示例>>Python>>正文


Python Jenkins.get_info方法代码示例

本文整理汇总了Python中jenkins.Jenkins.get_info方法的典型用法代码示例。如果您正苦于以下问题:Python Jenkins.get_info方法的具体用法?Python Jenkins.get_info怎么用?Python Jenkins.get_info使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在jenkins.Jenkins的用法示例。


在下文中一共展示了Jenkins.get_info方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: connect

# 需要导入模块: from jenkins import Jenkins [as 别名]
# 或者: from jenkins.Jenkins import get_info [as 别名]
def connect(credentials):
    """
    Since a user can have simple authentication with a single user/password or
    define a set of IRC nick to Jenkin's users with API tokens, this helper
    untangles this and returns a connection.

    If no authentication is configured, just a connection is returned with no
    authentication (probably read-only, depending on Jenkins settings)
    """
    connection = Jenkins(
        credentials['url'],
        username=credentials['username'],
        password=credentials['password'],
    )
    connection.password = credentials['password']

    # try an actual request so we can bail if something is off
    connection.get_info()

    return connection
开发者ID:alfredodeza,项目名称:helga-jenkins,代码行数:22,代码来源:helga_jenkins.py

示例2: Jenkins

# 需要导入模块: from jenkins import Jenkins [as 别名]
# 或者: from jenkins.Jenkins import get_info [as 别名]
# coding: utf-8
__author__ = 'xP'
from jenkins import Jenkins

jenkins_object = Jenkins('http://127.0.0.1:8080')
print(jenkins_object.get_info())
开发者ID:xpal0ne,项目名称:toolsCollection,代码行数:8,代码来源:base.py


注:本文中的jenkins.Jenkins.get_info方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。