当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
- Unexpected element.. required element
- 2020-08-29: process thread differences, in addition to the inclusion relationship, the underlying details?
- Windows 10 蓝牙管理页面'添加蓝牙或其他设备'选项点击无响应的解决方案
- Cloudquery v1.2.0 release
- Exclusive interview of guests at | 2020 PostgreSQL Asia Conference: Wang Tao
- Experiment one
- 大佬们如何在nginx镜像里面增加模块?
- STM32F030C6T6兼容替换MM32SPIN05PF
- How to write plug-in code of small program mall system? How to use code to check whether the plug-in is successfully added?
- FreeSWITCH视频会议“标准”解决方案
猜你喜欢

Jenkins installation and deployment process

Novice guidance and event management system in game development

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

甘特图对活动进行分组教程

Summary of common SQL statements

Bluetooth broadcast chip for Shanghai giant micro

List to map (split the list according to the key, and the value of the same key is a list)

Image processing toolkit imagexpresshow to view events

September 3, 2020: naked writing algorithm: loop matrix traversal.

PHP后门隐藏技巧
随机推荐
The method of local search port number occupation in Windows system
条形码识别器Dynamsoft Barcode Reader v7.5全新上线!
The Interpreter pattern of behavior pattern
Big data processing black Technology: revealing the parallel computing technology of Pb level data warehouse gaussdb (DWS)
Zhou Jie: database system of East China Normal University
Es create a new index database and copy the old index library, practice pro test effective!
STM32F030K6T6兼容替换灵动MM32F031K6T6
Code generator plug-in and creator preform file analysis
Benefits and functions of auto maintenance app development
Bluetooth broadcast chip for Shanghai giant micro
Stm32f030k6t6 compatible replacement smart mm32f031k6t6
甘特图对活动进行分组教程
Detailed software engineering -- the necessary graphs in each stage
谈了多年的数字化转型,为什么还有很多企业依然“口头管理”
To solve the problem that the data interface is not updated after WPF binding set
python3操作gitlab
jenkins pipline stage 设置超时
[graffiti Internet of things footprints] panoramic introduction of graffiti cloud platform
【涂鸦物联网足迹】涂鸦云平台全景介绍
Summary of common SQL statements