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’

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, otherwise None

Return type

Job

static get_jenkins_plugin_name()[source]

Gets 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

Return type

str

jobs

Gets a list of all jobs contained in this folder

Return type

list of Job

static template_config_xml()[source]

XML configuration template for instantiating jobs of this type

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