pyjen.utils.jobxml module

Abstractions for managing the raw config.xml for a Jenkins job

class pyjen.utils.jobxml.JobXML(api)[source]

Bases: object

Wrapper around the config.xml for a Jenkins job

The source xml can be loaded from nearly any URL by appending “/config.xml” to it, as in “http://server/jobs/job1/config.xml

Parameters

api (JenkinsAPI) – Rest API for the Jenkins XML configuration managed by this object

add_property(prop)[source]

Adds a new job property to the configuration

Parameters

prop (XMLPlugin) – PyJen plugin associated with the job property to add

property plugin_name

the name of the Jenkins plugin associated with XML definition

Type

str

property properties

list of 0 or more Jenkins properties associated with this job

Each element in the list will be a reference to a PyJen plugin which is able to manipulate each job property. Any properties not supported by the PyJen plugins currently installed will be ignored.

Type

list (XMLPlugin)

update()[source]

Posts all changes made to the object back to Jenkins

property xml

Raw XML representation describing the configuration of this plugin, in plain-text format

Type

str