当前位置:网站首页>Python 3 operates the Jenkins module API
Python 3 operates the Jenkins module API
2020-11-06 22:38:00 【Leaf blade】
#coding=utf-8
import json
from time import sleep
import jenkins
# Set up jenkins Connection timeout 5 second
server = jenkins.Jenkins('http://192.168.xxx.xxx:8088',
username='root',
password='adminadmin',
timeout=5)
jenkins_job = 'ZEP-BACKEND-JAVA'
arg_dic = {
'git_url': 'http://192.168.xxx.xxx/ZEP-BACKEND/ZEP-BACKEND-JAVA.git',
'branch_build': 'master',
'package_name': 'javademo-1.0.jar',
'app_name': 'ZEP-BACKEND-JAVA',
'deploy_version': '2020-1102-2232-24BP',
'dir_build_file': 'javademo',
'zip_package_name': 'javademo-1.0.tar.gz',
}
next_build_number = server.get_job_info(jenkins_job)['nextBuildNumber']
server.build_job(jenkins_job, arg_dic)
print(next_build_number)
sleep(10)
build_info = server.get_build_info(jenkins_job, next_build_number)
print(json.dumps(build_info, sort_keys=True,
indent=4, separators=(',', ':')))
版权声明
本文为[Leaf blade]所创,转载请带上原文链接,感谢
边栏推荐
- August 30, 2020: naked write algorithm: the nearest common ancestor of two nodes in a binary tree.
- 小熊派开发板实践:智慧路灯沙箱实验之真实设备接入
- 移动端像素适配方案
- In 2020, how can wechat seal numbers be quickly lifted?
- Getting started with varhart xgantt
- How to use Gantt chart layers and filters
- STM32F030K6T6兼容替换灵动MM32F031K6T6
- What grammar is it? ]
- August 14, 2020: what are the execution engines for data tasks?
- Ora-02292: complete constraint violation (midbjdev2.sys_ C0020757) - subrecord found
猜你喜欢

Git remote library rollback specified version

Stm32f030k6t6 compatible replacement smart mm32f031k6t6

Application of UHF RFID medical blood management system

Event monitoring problem

#JVM 类加载机制

消防器材RFID固定资产管理系统

Cloudquery v1.2.0 release

南京标识标牌设计制作,导视VI系统设计

How does varhart xgantt represent working days on a calendar

Exclusive interview with Alibaba cloud database for 2020 PostgreSQL Asia Conference: Zeng Wenjing
随机推荐
2020-08-20: the difference between go and python?
谈了多年的数字化转型,为什么还有很多企业依然“口头管理”
Gantt chart grouping activities tutorial
迅为-iMX6ULL开发板上配置AP热点
Detailed software engineering -- the necessary graphs in each stage
Reserved battery interface, built-in charge and discharge circuit and electricity meter, quickly help easily handle hand-held applications
LEADTOOLS如何检测,读取和写入条形码
Two dimensional code location and alarm system of Expressway
The memorandum model of behavior model
超高频RFID医疗血液管理系统应用
“非洲用户的付费意愿并不低”——专访四达时代研发总监张亮
August 14, 2020: what are the execution engines for data tasks?
2020-09-04: do you understand the function call convention?
南京标志设计,logo设计公司
2020-08-15: under what circumstances should data tasks be optimized?
A good thing for working people -- to temper the will of iron and steel requires such an efficient computer
细数软件工程----各阶段必不可少的那些图
2020-08-19: what mechanism does TCP ensure reliability?
JS string - string string object method
2020-08-17: how to solve data skew in detail?