当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
- image operating system windows cannot be used on this platform
- ImageMagick - add watermark
- Ora-02292: complete constraint violation (midbjdev2.sys_ C0020757) - subrecord found
- Composition of MRAM cache
- List to map (split the list according to the key, and the value of the same key is a list)
- The first choice for lightweight GPU applications is the NVIDIA vgpu instance launched by Jingdong Zhilian cloud
- Empty test suite appears in JUnit test
- Markdown tricks
- Big data processing black Technology: revealing the parallel computing technology of Pb level data warehouse gaussdb (DWS)
- [graffiti Internet of things footprints] panoramic introduction of graffiti cloud platform
猜你喜欢

Stickinengine architecture 11 message queue

2020-08-15: under what circumstances should data tasks be optimized?

Composition of MRAM cache

Web API interface design: swaggerui document / unified response format / unified exception handling / unified authority verification

VARCHART XGantt如何在日历上表示工作日

Gantt chart grouping activities tutorial

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

How to add modules to nginx image?

What are the highlights of Huawei mate 40 series with HMS?

Jenkins installation and deployment process
随机推荐
Stickinengine architecture 11 message queue
Plug in bilibilibili new version 0.5.5
2020-08-17: how to solve data skew in detail?
Novice guidance and event management system in game development
How to write plug-in code of small program mall system? How to use code to check whether the plug-in is successfully added?
What are the highlights of Huawei mate 40 series with HMS?
How to optimize the decoding performance of dynamsoft barcode reader
Logo design company, Nanjing
Stm32f030f4p6 compatible with smart micro mm32f031f4p6
The use of Xunwei imx6 development board device tree kernel menuconfig
How to deploy Gantt chart quickly and correctly
Cloudquery v1.2.0 release
September 3, 2020: naked writing algorithm: loop matrix traversal.
1万辆!理想汽车召回全部缺陷车:已发生事故97起,亏损将扩大
#JVM 类加载机制
PHP后门隐藏技巧
7.Swarm搭建集群
MRAM高速缓存的组成
WebAPI接口设计:SwaggerUI文档 / 统一响应格式 / 统一异常处理 / 统一权限验证
Utility class functions (continuous update)