jenkins-python 获取正在运行的Job

官方文档

 

get_running_builds()

Return list of running builds.

Each build is a dict with keys ‘name’, ‘number’, ‘url’, ‘node’, and ‘executor’.

Returns: List of builds, str: str, str: int, str:str, str: str, str: int} ]
Example::
>>> builds = server.get_running_builds()
>>> print(builds)
[{'node': 'foo-slave', 'url': 'https://localhost/job/test/15/',
  'executor': 0, 'name': 'test', 'number': 15}]

 

posted @ 2020-09-08 14:39  wangju003  阅读(1202)  评论(1编辑  收藏  举报