Git Product home page Git Product logo

php-jenkins-api's Introduction

CarlosIO\Jenkins

Build Status

CarlosIO\Jenkins is a Jenkins API written in PHP for PHP 5.3+. It has been born for Dashboard and extreme feedback purposes.

At this time, it has support for the following:

  • Integrating different Jenkins information
  • Accessing to:
    • Jobs
    • ChangeSets
    • Changes
    • Authors
    • Properties

Requiring in another project

Using composer:

    "require": {
        "carlosio/jenkins": "dev-master"
    }

Usage

Usage is fairly straightforward,

<?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());

If you need user authentication, you just have to set your source URL like

$dashboard->addSource(new Source('http://user:[email protected]/view/All/api/json/?depth=2'));

php-jenkins-api's People

Contributors

carlosbuenosvinos avatar cmfcmf avatar mrkrstphr avatar nykopol avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

php-jenkins-api's Issues

Please add support for multibranch job folders

The API client assumes flat jobs. Multibranch pipeline-based jobs act as a container for multiple child jobs though. It would be great if you'd add support for that.

Rough start:

use CarlosIO\Jenkins\Job;

class PipelineJob extends Job
{
    public function getSubJobs()
    {
        return $this->_getItems('jobs', 'Job');
    }
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.