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


Python Jenkins.job_info方法代码示例

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


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

示例1: Jenkins

# 需要导入模块: from autojenkins import Jenkins [as 别名]
# 或者: from autojenkins.Jenkins import job_info [as 别名]
#!/usr/bin/python
import time
from autojenkins import Jenkins
 
j = Jenkins('http://192.168.1.216:8080/')
 
# Create a new job.
j.create_copy('my-new-job', 'Selenium-Test', repo='my-repo', branch='my-branch')
newjob = j.job_info('my-new-job')

while newjob != 'null':
	print 'Job Created Successfully'
	break
else:
	time.sleep(1)
开发者ID:oneshore,项目名称:jenkins-selenium-example,代码行数:17,代码来源:newjenkinsjob.py

示例2: Jenkins

# 需要导入模块: from autojenkins import Jenkins [as 别名]
# 或者: from autojenkins.Jenkins import job_info [as 别名]
date_regexp = re.compile("(\d+-\d+-\d+)")

jobHash = {}





if __name__ == '__main__':
    j = Jenkins('http://135.251.224.94:8080/')
    jobs = j.all_jobs()
    print(jobs)

    for job, color in jobs:
        if color in ['red', 'blue', 'yellow']:
            full_info = j.job_info(job)
            last_build = j.last_build_info(job)
            when = datetime.fromtimestamp(last_build['timestamp'] / 1000)
        else:
            when = '(unknown)'
        print("{0!s:<19} {1:<6} {2}".format(when, color, job))

    #print "Build!"
    #j.build("CodeWarrior_Build_Test")
    #print "Waiting"
    #j.wait_for_build("CodeWarrior_Build_Test")
    #print "Result!"
    #j.last_build_info("CodeWarrior_Build_Test")
    #print "Create another"
    test = "YangSen"
    #j.create(test, "config.xml")
开发者ID:nuaays,项目名称:AutomateJenkins,代码行数:33,代码来源:demo_run_new_createjob.py

示例3: Jenkins

# 需要导入模块: from autojenkins import Jenkins [as 别名]
# 或者: from autojenkins.Jenkins import job_info [as 别名]
#!/usr/bin/python
import time
from autojenkins import Jenkins
 
j = Jenkins('http://192.168.1.216:8080/')

# Build new job.
print "Building Job"
j.build('my-new-job')

while  j.job_info('my-new-job')['color'] == 'notbuilt' or j.job_info('my-new-job')['color'] == 'notbuilt_anime':
	#print j.job_info('my-new-job')['color']
	time.sleep(1)
	if j.job_info('my-new-job')['color'] == 'blue' or j.job_info('my-new-job')['color'] == 'yellow' or j.job_info('my-new-job')['color'] == 'red':
		#print j.job_info('my-new-job')['color']
		print 'Build Completed'
		break

if j.last_result('my-new-job')['result'] == 'SUCCESS':
	print 'Job was built successfully'
else:
	print 'Build failed'	
开发者ID:oneshore,项目名称:jenkins-selenium-example,代码行数:24,代码来源:buildandcheck.py


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