Crate jenkins_api [] [src]

Bindings to Jenkins JSON API

Example

extern crate jenkins_api;

use jenkins_api::JenkinsBuilder;

fn main() {
    let jenkins = JenkinsBuilder::new("http://localhost:8080")
        .with_user("user", Some("password"))
        .build()
        .unwrap();

    let job = jenkins.get_job("job name").unwrap();
    let build = job.last_build.unwrap().get_full_build(&jenkins).unwrap();

    println!(
        "last build for job {} at {} was {:?}",
        job.name, build.timestamp, build.result
    );
}

Modules

action

types to parse the actions that triggered a Build

Structs

Build

A Build of a Job

Home

Index of Jenkins, with details about the master, a list of Job and a list of View

Jenkins

Client struct with the methods to query Jenkins

JenkinsBuilder

Builder for Jenkins client

Job

A Jenkins Job

Queue

The Jenkins Queue, the list of QueueItem that are waiting to be built

QueueItem

A queued item in Jenkins, with information about the Job and why / since when it's waiting

ShortBuild

Short Build that is used in lists and links from other structs

ShortJob

Short Job that is used in lists and links from other structs

ShortQueueItem

Short Queue Item that is returned when building a job

ShortView

Short View that is used in lists and links from other structs

View

A Jenkins View with a list of ShortJob

Enums

BallColor

Ball Color corresponding to a BuildStatus

BuildStatus

Status of a build

Error

Errors that can be thrown

Mode

Describe how Jenkins allocates jobs to agents