jenkins 常用api

本文详细介绍Jenkins API的使用方法,包括通过curl命令获取job的执行状态和结果,触发job构建的参数设置,以及Jenkins模块的常用方法。同时提供多个API链接,帮助读者深入理解Jenkins的远程操作。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

#域名:jenkins域名 ;   xxxxxx.com
#名称:job name  ;  new_rank_diff
#10:job_id



curl -X GET http://域名/job/名称/lastBuild/api/json   获取job最近一次构建job的执行结果
#curl -X GET http://xxxxxx.com/job/new_rank_diff/lastBuild/api/json
     
curl -X GET http://域名/job/名称/10/api/json   获取指定job的执行状态
#curl -X GET http://xxxxxx.com/job/new_rank_diff/10/api/json 

curl -X POST http://xxxxx.com/job/new_rank_diff/buildWithParameters -d order_date=20200712 -d test_locals_id_point_version=11111 --user user:password

#user:jenkins用户登录名
#password:  apitoken    用户-->设置--->apitoken

 jenkins模块常用方法:https://www.cnblogs.com/znicy/p/5498609.html

 jenkins其他相关api:https://www.jianshu.com/p/e1b716318996

api简介:https://debugtalk.com/post/manage-Jenkins-via-remote-api/

api出发job的几种方法:https://www.jianshu.com/p/23e7660b7d5c

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值