当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
- RFID fixed assets management system for fire equipment
- confd
- Image processing toolkit imagexpresshow to view events
- 甘特图对活动进行分组教程
- 南京标志设计,logo设计公司
- August 24, 2020: what are small documents? What's wrong with a lot of small files? How to solve many small files? (big data)
- Zhou Jie: database system of East China Normal University
- Two dimensional code location and alarm system of Expressway
- 磁存储芯片STT-MRAM的特点
- JVM memory allocation - xms128m - xmx512m - XX: permsize = 128M - XX: maxpermsize = 512M
猜你喜欢
测试攻城狮必备技能点!一文带你解读DevOps下的测试技术
How to optimize the decoding performance of dynamsoft barcode reader
[graffiti Internet of things footprints] panoramic introduction of graffiti cloud platform
如何使用甘特图图层和筛选器
VARCHART XGantt入门教程
The memorandum model of behavior model
.NETCore3.1+Vue.js打造的低代码工作流引擎
Empty test suite appears in JUnit test
Stm32f030f4p6 compatible with smart micro mm32f031f4p6
Reserved battery interface, built-in charge and discharge circuit and electricity meter, quickly help easily handle hand-held applications
随机推荐
Erd-online free online database modeling tool
WebAPI接口设计:SwaggerUI文档 / 统一响应格式 / 统一异常处理 / 统一权限验证
PHP后门隐藏技巧
Using JSON webtoken (JWT) to generate token in nodejs
移动端像素适配方案
Code generator plug-in and creator preform file analysis
How to create an interactive kernel density chart
甘特图对活动进行分组教程
8.Swarm创建维护和水平扩展Service
Characteristics of magnetic memory chip STT-MRAM
NAND FLASH的接口控制设计
Stm32f030k6t6 compatible replacement smart mm32f031k6t6
Countdown | 2020 PostgreSQL Asia Conference - agenda arrangement of Chinese sub Forum
The use of Xunwei imx6 development board device tree kernel menuconfig
Novice guidance and event management system in game development
confd
August 30, 2020: naked write algorithm: the nearest common ancestor of two nodes in a binary tree.
小熊派开发板实践:智慧路灯沙箱实验之真实设备接入
python3操作gitlab
应用层软件开发教父教你如何重构,资深程序员必备专业技能