Provides an object-oriented interface to connect with a Jenkins installation
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.
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
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
use CodedMonkey\Jenkins\Jenkins; $jenkins = new Jenkins('http://tim:firstname.lastname@example.org'); // Get an array of all jobs $jenkins->jobs->all();
composer install vendor/bin/phpunit
This component is released under the MIT license.