Skip to content

codedmonkey/jenkins

Repository files navigation

Jenkins API Client for PHP

The Jenkins component provides an object-oriented interface to connect with a Jenkins installation through the REST API.

Please note that this library is still in development, usage in production environments is highly discouraged. Feel free to open an issue for any feature requests or unexpected behavior.

Installation

This component requires an HTTP Client that integrates with HTTPlug. The CURL Client works fine in most cases, but you can also choose to integrate with a third-party library like Guzzle. For integration with the Symfony framework, see HttplugBundle.

This component is available as a package on Packagist:

composer require codedmonkey/jenkins php-http/curl-client guzzlehttp/psr7

Basic Usage

To set up a connection to the Jenkins installation, provide a URL containing a username and an API token through HTTP basic authentication. This is usually formatted as http://username:token@hostname:port.

use CodedMonkey\Jenkins\Jenkins;

$jenkins = new Jenkins('http://tim:1234567890@jenkins.host');

// Get an array of all jobs
$jenkins->jobs->all();

Running Tests

composer install
vendor/bin/phpunit

Documentation

Resources

License

This component is released under the MIT license.

About

Provides an object-oriented interface for PHP projects to connect with a Jenkins installation.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages