pyjen.plugins.folderjob module

Primitives that manage Jenkins job of type ‘Folder’

class pyjen.plugins.folderjob.FolderJob(api)[source]

Bases: pyjen.job.Job

Jenkins job of type ‘folder’

Parameters

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

create_job(job_name, job_class)[source]

Creates a new job on the Jenkins dashboard

Parameters
  • job_name (str) – The name for this new job. This name should be unique, different from any other jobs currently managed by the Jenkins instance

  • job_class – PyJen plugin class associated with the type of job to be created

Returns

An object to manage the newly created job

Return type

Job

find_job(job_name)[source]

Searches all jobs managed by this Jenkins instance for a specific job

Parameters

job_name (str) – the name of the job to search for

Returns

If a job with the specified name can be found, and object to manage the job will be returned. If no job with the specified name can be found, will return None.

Return type

Job

static get_jenkins_plugin_name()[source]

str: the name of the Jenkins plugin associated with this PyJen plugin

This static method is used by the PyJen plugin API to associate this class with a specific Jenkins plugin, as it is encoded in the config.xml

property jobs

list of all jobs contained inthis folder

Type

list (Job)

static template_config_xml()[source]
Returns

a basic XML configuration template for use when instantiating jobs of this type

Return type

str

pyjen.plugins.folderjob.PluginClass

alias of pyjen.plugins.folderjob.FolderJob