2017 © Pedro Peláez
 

library rundeck-client

PHP Client for Rundeck HTTP API

image

rundeck/rundeck-client

PHP Client for Rundeck HTTP API

  • Tuesday, October 17, 2017
  • by philipwhitt
  • Repository
  • 1 Watchers
  • 1 Stars
  • 92 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 4 Forks
  • 1 Open issues
  • 3 Versions
  • 26 % Grown

The README.md

Build Status, (*1)

Rundeck PHP Client

PHP Client for Rundeck HTTP Api version 10 and 11. Not all features are supported by API version 10., (*2)

Version 10 (Rundeck v2.0.+) Docs:, (*3)

http://rundeck.org/2.0.1/api/index.html, (*4)

Version 11 (Rundeck v2.1.+) Docs:, (*5)

http://rundeck.org/2.1.1/api/index.html, (*6)

Install With Composer

{
    "require" : {
        "rundeck/rundeck-client" : "1.*"
    }
}

Examples

<?php
use Rundeck\RundeckClient;

// Init client, user/pass is optional
$rd = new RundeckClient('http://localhost:4440', 'admin', 'admin');

// returns array of Rundeck\Api\Project
$projects = $rd->getProjects();

// returns array of Rundeck\Api\Job
$jobs = $rd->getJobs($projects[0]->getName()); // By Project Name

// backup/export project jobs
foreach ($projects as $project) {
    @mkdir(__DIR__.'/xml/'.$project);

    $xml = $rd->exportJobs($project);

    file_put_contents('/path-to-jobs/'.$project.'/jobs.xml', $xml);
}

// create project and import jobs
$projectName = 'Hello World';
$rd->deleteProject($projectName); // requires rundeck v2.1.+
$rd->createProject($projectName); // requires rundeck v2.1.+
$rd->importJobs($projectName, file_get_contents('/path-to-jobs/jobs.xml'));

Todo

Rundeck API is fairly robust - only a few features are available via this client. Feel free to put in a pull request to finish out the missing features., (*7)

The Versions

17/10 2017

dev-master

9999999-dev

PHP Client for Rundeck HTTP API

  Sources   Download

GPL-3.0+

The Requires

 

The Development Requires

17/10 2017

1.1

1.1.0.0

PHP Client for Rundeck HTTP API

  Sources   Download

GPL-3.0+

The Requires

 

The Development Requires

13/04 2016

1.0

1.0.0.0

PHP Client for Rundeck HTTP API

  Sources   Download

GPL-3.0+

The Requires

 

The Development Requires