Skip to end of metadata
Go to start of metadata

Introduction

This page contains a description of DamageControl's XML-RPC interface.

(warning) It is our intention to agree on this API with other Continuous Integration systems such as CruiseControl, CruiseControl.NET and BuildBot.
If we (developers of these CI systems) agree on the API, clients that are written to conform to it will be usable across all CI systems. Please comment at the bottom of this page if you want to participate in the consolidation of the API. You must sign up for an account here if you wish to comment.

The reason why we (DamageControl team) are suggesting XML-RPC is:

  • It is platform neutral, and clients can be written for many platforms.
  • It is simpler than e.g. SOAP, but should be powerful enough for all CI systems.

(We are considering moving to SOAP though, see comments at the very bottom).

Clients

There are several clients out there (some stable, some under development or planning) that currently use a "proprietary" API (i.e. won't work with other CI systems than the ones they are designed for). We can fix this together and have much better interop! The clients we know of are:

Client/Protocol

Description

CCTray

A system tray app for Windows that monitors builds on CC.NET.

CC JMX

An API that allows remote management of CC (Java)

Dashboard

A CruiseControl Java Swing client integrated with IntelliJ IDEA

CruiseControl Yahoo Messenger

A Y! bot that watches CruiseControl builds

DamageControl IDEA plugin

Similar to Dashboard, but uses DamageControl's current XML-RPC API

DamageControl Web Admin

A web application that allows remote management and monitoring of DamageControl

DamageControl IRC

An IRC bot that notifies an IRC channel about DamageControl's status

DamageControl Jabber

A Jabber bot that notifies an IRC channel about DamageControl's status

Again, the goal of this XML-RPC effort is to make all these clients conform to the same API. More on how to achieve this in XML-RPC Bridges.

Public and Private APIs

Some operations should be open for all. This includes all operations that don't modify any state on the CI system, but merely provide querying functionality. These operations should be part of the public API.

Other operations should be restricted to administrators or project developers. These are operations that modify the CI system's state.

The suggested public and private APIs below have been gathered by looking at DamageControl, CruiseControl and CruiseControl.NET's various remote APIs.

Public API

Usually unauthenticated. Accessible through http://server:4712/private/xmlrpc

Syntax

Description

Required?

string[] status.get_project_names()

Get all project names

Yes

string[] status.get_running_builds()

Get project names corresponding to currently running builds or an emty array if server is idle

Yes

array status.get_builds(string project_name, int number_of_builds)

Get an array of struct. Each struct represents a build. The fields of the build struct is defined below

Yes

struct status.get_last_completed_build(string project_name)

Last completed build, null if no such project

Yes

struct status.get_user_info(string scm_user_id)

Additional info for a build.

No

Private API

Usually authenticated and encrypted by an Apache proxy. Accessible through http://server:4712/private/xmlrpc. Can be unauthenticated in closed (corporate) environments (although not recommended for big corps).

Syntax

Description

Required?

void server.request_build(string project_name, string scm_timestamp_utc)

Requests a build, scm_timestamp_utc has to be formatted according to #Timestamp format.

Yes

void server.pause_build(string project_name)

Pauses a currently ongoing build.

No

void server.resume_build(string project_name)

Resumes a paused build.

No

array server.get_projects()

Gets an array of all projects managed by the CI server.

No

void server.register_project(struct project)

Registers a new (or updates an existing) project to be managed by the CI server.

No

void server.register_user(struct user)

Registers new (or updates existing) user information.

No

Data formats

Build struct

Represents a build result (in the past or currently running)

XML-RPC type - Field Name

Description

Required?

string project_name

The name of the project

Yes

string status

Status of the buld

Yes. One of "IDLE", "SUCCESSFUL", "FAILED", "QUEUED", "BUILDING", "PAUSED", "CHECKING OUT"

array modifications

array of Modification struct

Yes

string request_time

The time the build was requested, in UTC according to the SCM machine

Yes

string start_time

The time the build started, in UTC according to the CI machine

Yes

string end_time

The time the build ended, in UTC according to the CI machine

Yes

string label

The label

No. Should only be set for SUCCESSFUL builds, but even then is optional

string webpage

URL pointing to a build-specific web page with more detailed info

No.

Modification struct

This struct represents a changed file.

XML-RPC type - Field Name

Description

Required?

string path

relative path to the modified file. '/' as path separator

Yes

string developer

SCM id of the developer

Yes

string message

The commit message

Yes

string revision

The current revision of the file

Yes

string timestamp

The timestamp of the file, in UTC according to the SCM

Yes

string action

What happened to the file since the last revision

No. If present, should be one of the following: "MODIFIED", "ADDED", "MOVED", "REMOVED"

Project struct

Represents a project to be managed by the CI system

XML-RPC type - Field Name

Description

Required?

string project_name

The name of the project

Yes

string scm_spec

Location of the SCM (We might need a new struct to support various SCMs)

Yes

string build_command

Command line to execute in order to build the project

Yes

string email

Where to email build results

Yes

boolean email_success

Whether to mail on successful builds

Yes

string webpage

URL pointing to the main page for build results

No

string rss

URL pointing to an RSS feed for builds

No

User struct

Represents a user (a developer with commit access to the SCM).

XML-RPC type - Field Name

Description

Required?

string scm_id

The SCM user id

Yes

string name

Full name of the user

Yes

string email

User's email address

Yes

string phone

User's phone number

No

string yahoo

User's Y! id

No

string msn

User's msn id

No

string jabber

User's jabber id

No

Timestamp format

yyyyMMddhhMMss

Labels
  • None