carlosio / jenkins
Jenkins API
1.1.0
2014-04-22 10:41 UTC
Requires
- php: >=5.3.3
This package is auto-updated.
Last update: 2024-09-22 04:34:35 UTC
README
CarlosIO\Jenkins是一个用于PHP 5.3+的Jenkins API,它旨在为仪表板和极端反馈提供支持。
目前,它支持以下功能
- 整合不同的Jenkins信息
- 访问
- 任务
- 变更集
- 变更
- 作者
- 属性
在其他项目中使用
使用composer
"require": {
"carlosio/jenkins": "dev-master"
}
使用方法
使用方法相当简单,
<?php require_once __DIR__ . '/../vendor/autoload.php'; use CarlosIO\Jenkins\Dashboard; use CarlosIO\Jenkins\Source; $dashboard = new Dashboard(); $dashboard->addSource(new Source('http://ci.jenkins-ci.org/view/All/api/json/?depth=2')); // Add as many sources as you want // ... print_r($dashboard->getJobs());
如果您需要用户认证,只需设置您的源URL如下
$dashboard->addSource(new Source('http://user:password@ci.jenkins-ci.org/view/All/api/json/?depth=2'));