Build

A jenkins build represents a single execution of a Jenkins Job.

Builds can be thought of as the second level of the jenkins heirarchy beneath Jobs. Builds can have state, such as whether they are running or not. They can also have outcomes, such as wether they passed or failed.

Build objects can be associated with Results and Artifacts.g

class jenkinsapi.build.Build(url, buildno, job, depth=1)[source]

Represents a jenkins build, executed in context of a job.

get_causes()[source]

Returns a list of causes. There can be multiple causes lists and some of the can be empty. For instance, when a build is manually aborted, Jenkins could add an empty causes list to the actions dict. Empty ones are ignored.

get_console()[source]

Return the current state of the text console.

get_downstream_builds()[source]

Get the downstream builds for this build :return List of Build or None

get_downstream_job_names()[source]

Get the downstream job names for this build :return List of string or None

get_downstream_jobs()[source]

Get the downstream jobs for this build :return List of jobs or None

get_master_build()[source]

Get the master build if it exist, None otherwise :return Build or None

get_master_build_number()[source]

Get the master build number if it exist, None otherwise :return: int or None

get_master_job()[source]

Get the master job object if it exist, None otherwise :return: Job or None

get_master_job_name()[source]

Get the master job name if it exist, None otherwise :return: String or None

get_matrix_runs()[source]

For a matrix job, get the individual builds for each matrix configuration :return: Generator of Build

get_result_url()[source]

Return the URL for the object which provides the job’s result summary.

get_resultset()[source]

Obtain detailed results for this build.

get_timestamp()[source]

Returns build timestamp in UTC

get_upstream_build()[source]

Get the upstream build if it exist, None otherwise :return Build or None

get_upstream_build_number()[source]

Get the upstream build number if it exist, None otherwise :return: int or None

get_upstream_job()[source]

Get the upstream job object if it exist, None otherwise :return: Job or None

get_upstream_job_name()[source]

Get the upstream job name if it exist, None otherwise :return: String or None

has_resultset()[source]

Return a boolean, true if a result set is available. false if not.

is_good()[source]

Return a bool, true if the build was good. If the build is still running, return False.

is_running()[source]

Return a bool if running.

stop()[source]

Stops the build execution if it’s running :return boolean True if succeded False otherwise or the build is not running

Previous topic

Artifact

Next topic

Using Jenkins API

This Page