Crate jenkins_api [] [src]

Bindings to Jenkins JSON API

Example

extern crate failure;

extern crate jenkins_api;

use jenkins_api::JenkinsBuilder;

fn main() -> Result<(), failure::Error> {
    let jenkins = JenkinsBuilder::new("http://localhost:8080")
        .with_user("user", Some("password"))
        .build()?;

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

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

Modules

action

Types to parse the actions that triggered a Build

changeset

Types describing changes between two builds

error

Helper type for error management

job_builder

Helper to build a job

Structs

Artifact

A fie archived by a Build

HealthReport

Health Report 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

MergeOptions

SCM merge options

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

ShortUser

Short User that is used in list and links from other structs

Enums

BallColor

Ball Color corresponding to a BuildStatus

Browser

A browser

Build

A Build of a Job

BuildStatus

Status of a build

Error

Errors that can be thrown

Job

A Jenkins Job

Mode

Describe how Jenkins allocates jobs to agents

Property

A property of a job

SCM

An SCM

ShortView

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

View

A Jenkins View with a list of ShortJob