pyjen.queue_item module
Abstraction around a scheduled build contained in the Jenkins build queue
- class pyjen.queue_item.QueueItem(api)[source]
Bases:
object
Abstraction around a scheduled build contained in the Jenkins build queue
- Parameters
api (JenkinsAPI) – Pre-initialized connection to the Jenkins REST API
- property blocked
Is this scheduled build waiting for some other event to complete?
Warning
May return None if this queue item has been invalidated by Jenkins
- Type
- property build
Once this scheduled build leaves the queue, this property returns a reference to the running build. While the item is still queued, this property returns None.
See the
waiting()
property on this object for a way to detect whether a queued item has left the queue or not.- Type
- property buildable
is this queued build able to be built on this build farm?
Warning
May return None if this queue item has been invalidated by Jenkins
- Type
- property cancelled
Has this queued build been cancelled?
Warning
May return None if this queue item has been invalidated by Jenkins
- Type
- is_valid()[source]
bool: Checks to make sure the queue item this object manages still exists
Jenkins periodically expires / invalidates queue items server-side. There is no way for us to detect or predict when this will happen. When it does, this client-side queue item object will no longer refer to a valid REST API endpoint. This helper method helps users of the PyJen library check to see if the object still points to a valid queue item.
- property job
the Jenkins job associated with this scheduled build
Warning
May return None if this queue item has been invalidated by Jenkins
- Type
- property reason
Descriptive text explaining why this build is still in the queue
Warning
May return None if this queue item has been invalidated by Jenkins
- Type
- property stuck
Is this scheduled build blocked / unable to build?
Warning
May return None if this queue item has been invalidated by Jenkins
- Type
- property uid
unique numeric identifier of this queued build
Guaranteed to return a valid identifier, even when the queue item this object refers to has been invalidated by Jenkins.
- Type