PHP code example of carlosio / jenkins
1. Go to this page and download the library: Download carlosio/jenkins library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
carlosio / jenkins example snippets
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());
$dashboard->addSource(new Source('http://user:[email protected]/view/All/api/json/?depth=2'));