标签:python http pass import jobs build jenkin follow min
jenkinsapi抓取jenkins网页信息#!/usr/bin/python
#coding:utf-8
from jenkinsapi.jenkins import Jenkins
from jenkinsapi.build import Build
def get_server_instance():
server = Jenkins(‘http://10.0.1.2:8080/jenkins‘, username=‘ming‘, password=‘xxxxxx‘)
return server
server = get_server_instance()
print(server.version) (显示jenkins版本)
print(server.keys())
print(server.get_jobs_list()) (显示jenkins上所有job信息)
标签:python http pass import jobs build jenkin follow min
原文地址:http://blog.51cto.com/yangzhiming/2313626