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
Builds are executions of jobs and thus instances of this class are typically generated from the
Job
class.See also
- Parameters
api (
/utils/jenkins_api/JenkinsAPI
) – Pre-initialized connection to the Jenkins REST API
-
changeset
¶ Gets the list of SCM changes associated with this build
- Returns
0 or more SCM changesets associated with / included in this build.
- Return type
-
console_output
¶ Gets the raw console output for this build as plain text
- Returns
Raw console output from this build, in plain text format
- Return type
-
description
¶ Gets the descriptive text associated with this build.
May be an empty string if no description given.
- Return type
-
duration
¶ Total runtime of the build, in milliseconds
Returns 0 if build hasn’t finished
- Return type
-
estimated_duration
¶ Estimated runtime for a running build
Estimate is based off average duration of previous builds, in milliseconds
- Return type
-
is_building
¶ Checks to see whether this build is currently executing
- Returns
True if the build is executing otherwise False
- Return type
-
number
¶ Gets the sequence number of this build
- Returns
sequentially assigned integer value associated with this build
- Return type
-
result
¶ Gets the status of the build
- Returns
Result state of the associated job upon completion of this build. Typically one of the following:
”SUCCESS”
”UNSTABLE”
”FAILURE”
”ABORTED”
- Return type
-
start_time
¶ Gets the time stamp of when this build was started
- Returns
the date and time at which this build was started
- Return type