当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
- Characteristics of magnetic memory chip STT-MRAM
- Practice of Xiaoxiong school development board: real equipment access of smart street lamp sandbox experiment
- FreeSWITCH视频会议“标准”解决方案
- MRAM高速缓存的组成
- 移动端像素适配方案
- 南京标志设计,logo设计公司
- 2020-09-04: do you understand the function call convention?
- Gantt chart grouping activities tutorial
- What grammar is it? ]
- Exclusive interview of guests at | 2020 PostgreSQL Asia Conference: Wang Tao
猜你喜欢

Design of NAND flash interface control

迅为iMX6开发板-设备树内核-menuconfig的使用

三步轻松理解Kerberos协议

The essence of transaction and the principle of deadlock

Dynamsoft barcode reader v7.5!

win7 APPCRASH(解决方法)(转)

Utility class functions (continuous update)

Message queue - Analysis

谈了多年的数字化转型,为什么还有很多企业依然“口头管理”

如何才能快速正确的部署甘特图
随机推荐
Cloudquery v1.2.0 release
实验一
Points to be considered when deleting mapping field of index in ES
The first choice for lightweight GPU applications is the NVIDIA vgpu instance launched by Jingdong Zhilian cloud
Using JSON webtoken (JWT) to generate token in nodejs
The advantages and functions of psychological counseling app
The memorandum model of behavior model
三步轻松理解Kerberos协议
Summary of common SQL statements
jenkins pipline stage 设置超时
LEADTOOLS如何检测,读取和写入条形码
Stm32f030k6t6 compatible replacement smart mm32f031k6t6
ImageMagick - 添加水印
A good thing for working people -- to temper the will of iron and steel requires such an efficient computer
PHP后门隐藏技巧
Exclusive interview of guests at | 2020 PostgreSQL Asia Conference: Wang Tao
磁存储芯片STT-MRAM的特点
VARCHART XGantt入门教程
2020-08-19: what mechanism does TCP ensure reliability?
Practice of Xiaoxiong school development board: real equipment access of smart street lamp sandbox experiment