当前位置:网站首页>jenkinsclient | 好用的jenkins客户端
jenkinsclient | 好用的jenkins客户端
2022-06-10 04:11:00 【Python研究所】

前言
当我们的 jenkins 服务所在的机器无法在外部访问,或者端口不通的时候,我们想要查看 jenkins 上的项目情况就很难,这个时候我们怎么办呢?我推荐给你们一种最简单的工具。
jenkinsclient
jenkinsclient 是一个 python 的第三方包,安装简单,使用方便,是优秀的 jenkins 第三方客户端工具。
安装
pip3 install jenkinsclient
配置
# 1、生成配置文件(位于/root/.jenkinsclient.yaml)
jenkins config generate
# 2、配置jenkins信息
vi /root/.jenkinsclient.yaml
# 根据实际情况修改,模板如下
jenkins_servers:
- name: default
url: http://0:8080
username: 'admin'
token: '[email protected]'
use: default
使用
# 1、查看项目列表
[[email protected] ~]# jenkins jobs
任务名称 类型 链接
-------- -------- --------
Auto_Test_Pipline WorkflowJob http://x.x.x.22:8888/job/Auto_Test_Pipline/
xxx-FT-Pipline FreeStyleProject http://x.x.x.22:8888/job/xxz-FT-Pipline/
[[email protected] ~]#
# 2、查看项目详情
[[email protected] ~]# jenkins job info Auto_Test_Pipline
actions: [{}, {}, {}, {}, {}, {}, {}, {}, {"_class": "com.cloudbees.plugins.credentials.ViewCredentialsAction"}]
description: null
displayName: Auto_Test_Pipline
displayNameOrNull: null
fullDisplayName: Auto_Test_Pipline
fullName: Auto_Test_Pipline
name: Auto_Test_Pipline
url: http://x.x.x.22:8888/job/Auto_Test_Pipline/
buildable: true
builds: [{"_class": "org.jenkinsci.plugins.workflow.job.WorkflowRun", "number": 1, "url": "http://x.x.x.22:8888/job/Auto_Test_Pipline/1/"}]
color: red
firstBuild: {"_class": "org.jenkinsci.plugins.workflow.job.WorkflowRun", "number": 1, "url": "http://x.x.x.22:8888/job/Auto_Test_Pipline/1/"}
healthReport: [{"description": "Build stability: All recent builds failed.", "iconClassName": "icon-health-00to19", "iconUrl": "health-00to19.png", "score": 0}]
inQueue: false
keepDependencies: false
lastBuild: {"_class": "org.jenkinsci.plugins.workflow.job.WorkflowRun", "number": 1, "url": "http://x.x.x.22:8888/job/Auto_Test_Pipline/1/"}
lastCompletedBuild: {"_class": "org.jenkinsci.plugins.workflow.job.WorkflowRun", "number": 1, "url": "http://x.x.x.22:8888/job/Auto_Test_Pipline/1/"}
lastFailedBuild: {"_class": "org.jenkinsci.plugins.workflow.job.WorkflowRun", "number": 1, "url": "http://x.x.x.22:8888/job/Auto_Test_Pipline/1/"}
lastStableBuild: null
lastSuccessfulBuild: null
lastUnstableBuild: null
lastUnsuccessfulBuild: {"_class": "org.jenkinsci.plugins.workflow.job.WorkflowRun", "number": 1, "url": "http://x.x.x.22:8888/job/Auto_Test_Pipline/1/"}
nextBuildNumber: 2
property: []
queueItem: null
concurrentBuild: true
resumeBlocked: false
# 3、查看slave列表
[[email protected] ~]# jenkins nodes
节点名称 架构 可用交换空间 可用内存空间 可用临时空间 可用磁盘空间
-------- -------- -------- -------- -------- --------
(master) Linux (amd64) 799.23/4096.0 MB 389.78/128385.95 MB 3220446 MB 3220446 MB
Test_VM_10.x.x.x Linux (amd64) 0.0/0.0 MB 30587.82/32003.24 MB9387 MB 17359 MB
Test_VM_10.x.x.x Linux (amd64) 3968.0/3968.0 MB 12455.17/15884.35 MB43546 MB 24488 MB
[[email protected] ~]#
怎么样,是不是很简单呢!
更多用法请移步:https://pypi.org/project/jenkinsclient/2.0/
以上就是今天的全部内容了,感谢您的阅读,我们下节再会。
点亮在看!
边栏推荐
- v-lazy
- Why do SQL statements use indexes but still slow queries?
- [learn FPGA programming from scratch -13]: quick start chapter - operation step 3 (functional simulation) -2-mentor HDL simulation tool introduction to Modelsim tool and basic principle of functional
- Distributed transaction solution
- [机缘参悟-19]:鬼谷子-捭阖篇-阴阳即矛盾,是万事万物的基本属性,也是鬼谷子哲学的根基之一
- tensorflow 中的 cross_entropy
- Application of PhD debate 𞓜 self supervised learning in Recommendation System
- MySQL - constraints
- [in depth study of 4g/5g/6g topic -25]: 5g NR startup process 4.3 - first scheduling of RRC connection request message msg3/rrcsetuprequest and Pusch uplink channel
- Using VBA's WebBrowser control to realize single sign on (SSO) in Excel
猜你喜欢

阿里云首次年度盈利,国内云厂商何时迎来集体回报期?

Find and replace good articles from the Internet in vim/vi

"Chinese characteristics" of Web3

Google Earth engine (GEE) - gpwv411: data set of average administrative unit area

Tailwind causes the button icon of antd not to be centered

5- common tool management

Lit (I): create components

Leetcode weekly buckle race 296

分布式事务解决方案

4-mirror address
随机推荐
汇编:关于函数完整流程的栈桢解析
[深入研究4G/5G/6G专题-28]: 5G NR开机流程4.6 - MSG5 (RRCSetupComplete)消息的调度
How to open an account on your mobile phone? Is it safe to open an account online?
Ssti (injection de gabarit) - (7)
Tailwind causes the button icon of antd not to be centered
[understanding of opportunity -16]: Pyramid hierarchy conforms to nature
[science and technology specialty-1]: overview and advantages of science and Technology Specialty Students
How to view Scala source code in idea
LeetCode 力扣周赛 296
[science and technology specialty-3]: how many students with science and technology specialty know about the senior high school entrance examination
3-编程语言--golang网址学习
[in depth study of 4g/5g/6g topic -24]: 5g NR startup process 4.2 - scheduling process and uplink synchronization of random access response message msg2, and time advance TA are sent through PDSCH cha
[essence of the trilogy of sub database and sub table]
MySQL——安装
[team learning] [phase 38] details of team learning content!
[in depth study of 4g/5g/6g topic -29]: 5g NR startup process 5.1 - NR network architecture, core network configuration of base stations
[enlightenment -18]: Confucianism, Buddhism and Taoism, different life stages, different choices
汇编:汇编指令分类
Lit(一):创建组件
分布式事务解决方案