PHPackages                             phppkg/jenkins-client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. phppkg/jenkins-client

ActiveLibrary[API Development](/categories/api)

phppkg/jenkins-client
=====================

Jenkins PHP API client

v1.0.2(2y ago)21.2kMITPHPPHP &gt;8.0CI passing

Since Nov 17Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/phppkg/jenkins-client)[ Packagist](https://packagist.org/packages/phppkg/jenkins-client)[ Docs](https://github.com/phppkg/jenkins-client)[ RSS](/packages/phppkg-jenkins-client/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (2)Versions (5)Used By (0)

Jenkins client
==============

[](#jenkins-client)

[![License](https://camo.githubusercontent.com/523ddf5179e01b0bed01a3a6d1c5addf71c8778ebdbc90d881edb5c0a77ec5f2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f706870706b672f6a656e6b696e732d636c69656e743f7374796c653d666c61742d737175617265)](LICENSE)[![Php Version](https://camo.githubusercontent.com/fc88df5f565f865755935415e3bc4c7269e552dff7178998e70f7082396055f4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f706870706b672f6a656e6b696e732d636c69656e743f6d61784167653d32353932303030)](https://packagist.org/packages/phppkg/jenkins-client)[![GitHub tag (latest SemVer)](https://camo.githubusercontent.com/9fd8c7eb972a79e461bc25f3c928d28ecbe742ba6da447ee75de205d0a7277b1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7461672f706870706b672f6a656e6b696e732d636c69656e74)](https://github.com/phppkg/jenkins-client)[![Unit Tests](https://github.com/phppkg/jenkins-client/actions/workflows/php.yml/badge.svg)](https://github.com/phppkg/jenkins-client/actions/workflows/php.yml)[![Deploy Pages](https://github.com/phppkg/jenkins-client/actions/workflows/static.yml/badge.svg)](https://github.com/phppkg/jenkins-client/actions/workflows/static.yml)

> **[中文说明](README.zh-CN.md)**

`jenkins-client` - Designed to interact with Jenkins CI using its API.

> `phppkg/jenkins-client` is inspired from the

Install
-------

[](#install)

- Required PHP 8.0+

**composer**

```
composer require phppkg/jenkins-client
```

Usage
-----

[](#usage)

Before anything, you need to instantiate the client :

```
$jenkins = new \PhpPkg\JenkinsClient\Jenkins('http://host.org:8080');
```

If your Jenkins needs authentication, you need to pass a URL like this : `'http://user:token@host.org:8080'`.

Simple example - sending "String Parameters":

```
curl JENKINS_URL/job/JOB_NAME/buildWithParameters \
--user USER:TOKEN \
--data id=123 --data verbosity=high
```

Another example - sending a "File Parameter":

```
curl JENKINS_URL/job/JOB_NAME/buildWithParameters \
--user USER:PASSWORD \
--form FILE_LOCATION_AS_SET_IN_JENKINS=@PATH_TO_FILE
```

Here are some examples of how to use it:

### Get the color of the job

[](#get-the-color-of-the-job)

```
    $job = $jenkins->getJob("dev2-pull");
    vdump($job->getColor());
    //string(4) "blue"
```

### Launch a Job

[](#launch-a-job)

```
    $job = $jenkins->launchJob("clone-deploy");
    vdump($job);
    // bool(true) if successful or throws a RuntimeException
```

### List the jobs of a given view

[](#list-the-jobs-of-a-given-view)

```
    $view = $jenkins->getView('madb_deploy');
    foreach ($view->getJobs() as $job) {
      var_dump($job->getName());
    }
    //string(13) "altlinux-pull"
    //string(8) "dev-pull"
    //string(9) "dev2-pull"
    //string(11) "fedora-pull"
```

### List builds and their status

[](#list-builds-and-their-status)

```
    $job = $jenkins->getJob('dev2-pull');
    foreach ($job->getBuilds() as $build) {
      var_dump($build->getNumber());
      var_dump($build->getResult());
    }
    //int(122)
    //string(7) "SUCCESS"
    //int(121)
    //string(7) "FAILURE"
```

### Check if Jenkins is available

[](#check-if-jenkins-is-available)

```
    var_dump($jenkins->isAvailable());
    //bool(true);
```

For more information, see the [Jenkins API](https://wiki.jenkins-ci.org/display/JENKINS/Remote+access+API).

License
-------

[](#license)

[MIT](LICENSE)

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance48

Moderate activity, may be stable

Popularity20

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 64.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~179 days

Total

3

Last Release

919d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d23e1decaf354e8f36a7ad61128865dc78dd63336c2d023d79aa3ff8ba2a05ff?d=identicon)[inhere](/maintainers/inhere)

---

Top Contributors

[![inhere](https://avatars.githubusercontent.com/u/5302062?v=4)](https://github.com/inhere "inhere (24 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (13 commits)")

---

Tags

jenkinsjenkins-apijenkins-clientapijenkinsjenkins-client

### Embed Badge

![Health badge](/badges/phppkg-jenkins-client/health.svg)

```
[![Health](https://phpackages.com/badges/phppkg-jenkins-client/health.svg)](https://phpackages.com/packages/phppkg-jenkins-client)
```

###  Alternatives

[m165437/laravel-blueprint-docs

API Blueprint Renderer for Laravel

22779.0k](/packages/m165437-laravel-blueprint-docs)[carlosio/jenkins

Jenkins API

2420.3k](/packages/carlosio-jenkins)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
