pyjen.build module

Primitives for interacting with Jenkins builds

class pyjen.build.Build(api)[source]

Bases: object

information about a single build / run of a Job

Parameters

api (JenkinsAPI) – Pre-initialized connection to the Jenkins REST API

abort()[source]

Aborts this build before it completes

property artifact_urls

list of 0 or more URLs to download published build artifacts

Type

list ()

property changeset

Description of 0 or more SCM revisions associated with / included in this build

Type

Changeset

property console_output

raw console output for this build as plain text

Type

str

property description

Gets the descriptive text associated with this build. May be an empty string if no description given.

Type

str

property duration

total runtime of the build, in milliseconds. Returns 0 if build hasn’t finished

Type

int

property estimated_duration

Estimated runtime for a running build, in milliseconds. Estimate is based off average duration of previous builds

Type

int

property is_building

True if the build is currently executing otherwise False

Type

bool

kill()[source]

Performs hard kill on this build

property number

sequentially assigned numeric ID for the build

Type

int

property result

state of the associated job upon completion of this build. Typically one of the following:

  • “SUCCESS”

  • “UNSTABLE”

  • “FAILURE”

  • “ABORTED”

Type

str

property start_time

time stamp of when this build was started

Type

datetime.datetime

property uid

internal, unique identifier associated with this build

Type

str

property url

URL of this build

Type

str